1. 18 May, 2018 3 commits
    • Wouter's avatar
      Use TreeView for structure view · c46163e3
      Wouter authored
      This replaces the raw JSON data and shows it nicely structured tree
      view, making it easier to navigate.
      
      Model taken from QJsonViewer
      (https://git.simply-life.net/simply-life.net/qjsonviewer/) with some
      small improvements/changes.
      c46163e3
    • Wouter's avatar
      Refactor DGRP renderer · f4c50a39
      Wouter authored
      - Split off some functions
      - Render upside down, then flip vertically in the end, to get all items
      positioned correctly
      - Rename some variables/members
      f4c50a39
    • Wouter's avatar
      Allow building with Qt 5.5 · 26815368
      Wouter authored
      - addCacheableShaderFromSourceCode() wasn't added until Qt 5.9
      - Flip the rendering vertically directly, so mirrorVertically isn't
      required (Qt 5.6+)
      26815368
  2. 17 May, 2018 4 commits
    • Wouter's avatar
      e0496133
    • Wouter's avatar
      [DGRP] OpenGL rendering and some refactoring · 454c8a84
      Wouter authored
      - The DGRP decoder now has friendlier enum/flag-based types for some
      fields
      
      - The decoder exposes some limited internal structure (frames) through
      its API
      
      - The DGRP decoder no longer composes the files to images, and therefore
      doesn't derive from the MultiImageChunkDecoder anymore. Instead
      rendering is expected to be done by the viewer.
      
      - The view now uses OpenGL to render the draw group
      
      - The renderer could still do with a little cleanup (better naming and
      such), but other than that it does seem to work well
      454c8a84
    • Wouter's avatar
      Declare Dbpf::unloadPlugin() · 65896675
      Wouter authored
      This started throwing errors...
      65896675
    • Wouter's avatar
      [SPR2] Fix alpha/Z channel decoding · bbf0e1b5
      Wouter authored
      - Pixels without alpha channel data should be fully opaque or
      transparent (depending on palette color)
      - Pixels with alpha data: the alpha channel is scaled from 0-31, so
      multiplication by 8 is required to get the proper 8 bit value
      - Write directly into data of QImages, using Format_Grayscale8 for Z and
      Format_Alpha8 (alpha) formats instead of palettes. This is semantically
      more correct.
      bbf0e1b5
  3. 10 May, 2018 3 commits
  4. 09 May, 2018 6 commits
    • Wouter's avatar
      Fix DBPFM installing default type info plugin templates · 63ba689b
      Wouter authored
      These were not installed, causing the split build to fail
      63ba689b
    • Wouter's avatar
      Fix Linux (Ubuntu 16) build · 854f2c33
      Wouter authored
      Qt doesn't need QMetaEnum include to access it in recent versions (QIcon
      pulls it in, so it seems). However, Qt 5.5 still needs it more
      explicitly.
      
      Also make sure dbpfm depends on the correct minimum Qt version, also
      during the split build.
      854f2c33
    • Wouter's avatar
      Fix loading of icons from resource files · 3467672f
      Wouter authored
      - Use the correct (renamed) QRC file
      - Correctly map the URL to the QRC filename or local filename
      
      Also keep the default icon's filename consistent, for less confusion
      3467672f
    • Wouter's avatar
      Add FBMP type support · 02a50546
      Wouter authored
      Plain Windows BMP (source: http://wiki.niotso.org/IFF#FBMP)
      02a50546
    • Wouter's avatar
      [CI] Add more plugins to split build setup · 5d1e34f0
      Wouter authored
      5d1e34f0
    • Wouter's avatar
      Show friendly type names with icons · 717cce30
      Wouter authored
      - New DBPFM plugin type (TypeInfoFactory) to provide the necessary
      information (includes necessary CMake stuff)
      - The TypeInfoImageProvider uses these plugins to generate pixmaps from
      provided icons
      - New proxy model to add decorations and manipulate Display of types in
      DBPFM
      - Initial plugin for Sims 1 type info
      
      Adds icons from KDE's Breeze set as fallbacks, but attempts to use
      system defaults first (only on Linux).
      
      All in all this adds a touch of user-friendliness, as it's become much
      easier to identify types (now by names, rather than hex codes)
      
      Minor required changes:
      - Q_ENUM() for the container enums (requires Qt 5.5+)
      - Bump copyright year in Readme
      717cce30
  5. 07 May, 2018 3 commits
  6. 06 May, 2018 4 commits
    • Wouter's avatar
      Use QString() on both sides of QCOMPARE · e59b316b
      Wouter authored
      This hopefully fixes build issues on the CI build because the different
      types of QString and char[]
      e59b316b
    • Wouter's avatar
      cc524a6a
    • Wouter's avatar
      Remove unused (test) code · 69173d59
      Wouter authored
      69173d59
    • Wouter's avatar
      Change chunk selection panel to TreeView · f6058d22
      Wouter authored
      This was introduced in Qt since the last time I did anything on this
      area. The TableToTreeProxyModel groups items in the base table model by
      keys etc.
      
      It's not yet fully functional: adding/removing chunks or changing their
      data will not properly propagate through to the proxy yet. But: this is
      a start and make the tree a lot more usable.
      
      Additional changes:
      - the old table still lives as DbpfTable
      - the main view starts up with a DbpfTable as tab
      - the base container model now always returns formatted text when
      accessing data based on role, similar to the DisplayRole. This is more
      consistent. Raw data may be added again in the future if it's necessary.
      f6058d22
  7. 05 May, 2018 2 commits
    • Wouter's avatar
      Fix "Save As" (compacting) of IFF files · cfd22aef
      Wouter authored
      The chunk's offsets need to be moved to after the chunk prefix. This
      solves crashes when using Save As for an IFF file
      cfd22aef
    • Wouter's avatar
      [HexView] Improve TextBlock initialization · cf590260
      Wouter authored
      - Make sure overrideLineHeight is set to < 0, so automatic height is
      used properly
      - Make sure lineHeight change is emitted when changing mode
      - Make sure font changes are processed initially (when cellSize is still
      empty)
      cf590260
  8. 04 May, 2018 3 commits
  9. 03 May, 2018 8 commits
  10. 02 May, 2018 4 commits
    • Wouter's avatar
      [HexView] Gutter click now acts as clicking before the start of a line · 9e629050
      Wouter authored
      I.e. much like clicking the very left of the hex view. The first click
      doesn't yet select the line, dragging does selection. A simple click
      simply moves the cursor to the start of the given line.
      
      This is consistent with at least Kate behavior in KDE; possibly the same
      for other editors too.
      9e629050
    • Wouter's avatar
      [HexView] Focus hex panel when clicking the gutter · 0f46545e
      Wouter authored
      But only if that or ASCII view doesn't already have the active focus
      0f46545e
    • Wouter's avatar
      [HexView] Fix gutter clicking breaking bindings · 91d7ce22
      Wouter authored
      The Hex->Ascii bindings are now completely done through property
      bindings again (they aren't broken through JS assignments anywhere). For
      Ascii->Hex, also add Binding for the selection, so clicking the gutter
      doesn't break the property binding
      91d7ce22
    • Wouter's avatar
      [HexView] Improve selection behavior when swapping order etc · e5704f40
      Wouter authored
      I.e. when moving the cursor from after to before the start selection
      (skipping the start character itself), the previous behavior was
      inconsistent (it would or wouldn't select the starting byte sometimes).
      
      Now the data is in character positions and normalization is done for the
      public API. This way the selection can also be properly determined to
      extract the selected data (still todo).
      e5704f40