Commit Graph

16 Commits

Author SHA1 Message Date
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
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Paul Chote
4d70996012 New shroud renderer. Fixes #2162. Fixes #3024. Fixes #4034.
Uses the original tile sprites in C&C and D2K and uses a smoother transition in all mods.
2013-12-11 20:51:49 +13:00
Paul Chote
400ad49de0 Allow maps/mods to properly disable fog or shroud (or both). 2013-04-11 22:36:56 +12:00
Matthias Mailänder
a682670b97 update developer commentary
for weapon traits, crates and palettes
clarify that you don't need to update the wiki page manually
2013-03-27 09:22:23 +01:00
Paul Chote
2d10f6b739 Remove unnecessary indirection from palette creation. 2013-02-22 17:06:29 +13:00
Paul Chote
db7887687b Remove hardcoded list of palette mod exclusions. 2013-02-22 15:04:41 +13:00
Chris Forbes
ca1fbb187b misc whitespace tidyups 2012-04-25 21:31:27 +12:00
Chris Forbes
9279161de6 tidy in OreRefinery, Harvester, CncLobbyLogic, ScaredyCat 2011-10-31 09:11:33 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Bob
597dba8584 untangling WorldRenderer from World 2010-10-12 17:24:23 +13:00
Chris Forbes
a08dacc9c2 add support for compressed packages (zip); strip unnecessary SharpZipLib dll. req reference to WindowsBase for System.IO.Packaging support (apparently Mono has it) 2010-07-18 17:39:19 +12:00
Chris Forbes
d5f12dd8ee trim down license spam in all files 2010-07-18 16:48:21 +12:00
Chris Forbes
db465e1fdd ActorInitializer, in preparation for next change (bob) 2010-06-19 14:28:30 +12:00
Chris Forbes
7fc5007ac8 moved various other traits 2010-05-20 18:47:22 +12:00