Commit Graph

6 Commits

Author SHA1 Message Date
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
7030d8b2b6 Changed HardwarePalette.ApplyModifiers to be more efficient.
- Add separate ImmutablePalette and MutablePalette classes since the distinction is extremely important to HardwarePalette.
- Keep a cache of palettes in HardwarePalette to avoid reallocation them every time ApplyModifiers is called.
- Palettes that are not allowed to be modified are copied to the buffer once when added, rather than every time ApplyModifiers is called.
- The AdjustPalette method now takes a read-only dictionary to prevent the dictionary being messed with.
- Added a constant for the palette size to remove its usage as a magic number in several areas.
- The ColorPreviewManagerWidget is annoying in that it needs to actually permanently update a palette after it has been added. To allow this, HardwarePalette now allows a palette to be replaced after initialization. The WorldRenderer therefore now also updates the PaletteReference it created earlier with the new palette to prevent stale data being used elsewhere.
2014-06-28 01:11:48 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
089973280d Add Multiply blend mode for D2K move-flash and shroud. 2013-12-11 19:22:54 +13:00
Paul Chote
536013f2d2 Rescale the custom palette from 0-128. 2013-10-26 19:15:05 +13:00
Paul Chote
ff21ec1605 Add PaletteFromR8 for loading embedded palettes.
The frames that define a custom palette are:
Frame range ->  offset (mem offset)
         38 ->   12007 (22063136)
        178 ->  159947 (21859680)
3494 - 3501 -> 2437846 (23366680)
3502 - 3509 -> 2443858 (23422744)
3510 - 3511 -> 2459105 (23363608)
3621 - 3625 -> 2572352 (23550488)
3739 - 3742 -> 2676956 (23534796)
2013-10-26 17:54:56 +13:00