Commit Graph

219 Commits

Author SHA1 Message Date
Paul Chote
7a71f87d9f Introduce Renderable.BeforeRender().
WorldRenderer.Draw() has been slightly reorganized
to ensure that BeforeRender is called before any
drawing render state (e.g. scissor) has been set.
2013-06-15 19:16:08 +12:00
Paul Chote
9b576d3fdd Add a visualization layer for renderable geometry. 2013-06-15 19:16:08 +12:00
Paul Chote
25dd8d9fa7 Fix aircraft shadow render order. 2013-05-23 21:25:11 +12:00
Paul Chote
e382dc9b71 Remove obsolete functions from WorldRenderer. 2013-05-17 18:12:28 +12:00
Paul Chote
e1290dca47 Round PxPosition to the nearest pixel. 2013-05-17 18:12:28 +12:00
Paul Chote
fb17654ea0 Convert Renderable to World Coordinates internally. 2013-05-17 18:12:26 +12:00
Paul Chote
d103a187f6 Make the guts of Renderable private. 2013-05-17 18:12:26 +12:00
Paul Chote
7719ad1f2d Move Renderable into its own file. 2013-05-17 18:12:26 +12:00
Paul Chote
248e815d99 More shroud refactoring.
This introduces a hash on Shroud which ShroudRenderer
can observe, removing the need to explicitly twiddle
a dirty flag between objects.

Shroud disabling is now done via RenderPlayer, so
enabling the cheat or winning/losing will now give
vis equivalent to an observer.
2013-04-10 21:08:22 +12:00
Paul Chote
c428cad70c Refactor per-player shrouds & fix shellmap shroud. 2013-04-10 19:36:03 +12:00
Matthias Mailänder
acc8cd1e5e fixes #2885 forgot to enable the cursor palette before drawing
split HardwarePalette.Update into two functions, closes #2847
2013-04-06 08:44:32 +02:00
Paul Chote
34a9675744 Remove unnecessary PPos.FromWPosHackZ() usage. 2013-03-31 21:35:30 +13:00
Paul Chote
9e4bab07e5 Add conversions and helpers for world coordinates. 2013-03-29 20:39:27 +13:00
Matthias Mailänder
851512a84e eliminate public CursorProvider.Palettes
don't hand over the cursor palette to the world renderer at all
still update worldrender palette (set and apply modifiers)
2013-03-25 06:30:39 +01:00
Matthias Mailänder
ba12aafd78 refactor cursor rendering
create a new cursor palette only once and not in WorldRenderer
move cusrsor sequence lookup and drawing to CursorProvider
2013-03-24 21:21:30 +01:00
Sascha Biedermann
35f4230984 added contrast to range circle 2013-03-20 18:53:28 +01:00
Paul Chote
82426e0e45 Move Palette from ModData to WorldRenderer. 2013-02-26 09:35:41 +13:00
Paul Chote
3033eb8be0 Die with a helpful error if a palette doesn't exist. 2013-02-26 09:35:41 +13:00
Paul Chote
e9665cf9f3 Remove WorldRenderer.GetPaletteIndex. 2013-02-26 09:35:41 +13:00
Paul Chote
9bc743068a Remove WorldRenderer.GetPalette. 2013-02-26 09:35:41 +13:00
Paul Chote
72a9954491 Simplify PaletteReference interface. 2013-02-26 09:35:40 +13:00
Paul Chote
f890ea010e Pass WorldRenderer to RenderAsTerrain for palette lookup. 2013-02-26 09:24:43 +13:00
Paul Chote
000a5eaa56 Pass WorldRenderer to IRenderModifiers and replace more palette lookups. 2013-02-24 15:45:03 +13:00
Paul Chote
885eec7444 Move effects to WorldRenderer palette lookup. 2013-02-24 15:43:20 +13:00
Paul Chote
95871e6cc1 Add a cache of PaletteReferences to WorldRenderer.
I don't expect any perf improvements by using this
cache, as you're simply moving the row lookup from
render-time to fetch-time. However, this is a
cleaner abstraction, and allows us to fail early
if the palette doesn't exist.
2013-02-24 15:43:19 +13:00
Paul Chote
f0ba0ce2e8 Wrap palette references with a PaletteRef object. 2013-02-24 15:43:15 +13:00
Paul Chote
db7887687b Remove hardcoded list of palette mod exclusions. 2013-02-22 15:04:41 +13:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Tirili
4f505eb6a1 Add ability to disable the shellmap 2011-10-23 13:24:26 +13:00
Chris Forbes
deeef336a1 group IPostRenderSelection impls by type, not by actor 2011-10-23 12:40:08 +13:00
Chris Forbes
ce8267992a remove self parameter from IPostRenderSelection.RenderAfterWorld 2011-10-23 12:23:15 +13:00
Chris Forbes
227bbc109e fix wonky indent in WorldRenderer.cs 2011-10-18 14:55:51 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
c84f53c10d Extract tile overlays into a shp instead of rolling our own in code; Remove UIOverlay. Fixes #1061. 2011-07-27 21:48:32 +12:00
Paul Chote
fc783ddf80 Support custom zoom levels 2011-07-25 22:23:17 +12:00
Paul Chote
926b396605 Fix bogus naming of Shaders/Renderers. Split LineRenderer into world and chrome variants. 2011-07-25 22:23:16 +12:00
Chris Forbes
2da523e824 drop unused WorldRenderer.DrawBox 2011-07-14 20:29:10 +12:00
Chris Forbes
9b3e6c5c4a remove FP sillyness from FindUnits & friends 2011-05-22 20:38:52 +12:00
Chris Forbes
ccc245ded4 reintroduce Cached<T>; use for Actor.Bounds, Actor.ExtendedBounds, which replace Actor.GetBounds(bool) 2011-05-22 20:38:48 +12:00
Chris Forbes
068ee3320e saner IPostRender dispatch 2011-05-04 18:02:34 +12:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
8a14662bc1 remove unitinfluence debug, not needed anymore 2011-03-12 22:33:27 +13:00
Chris Forbes
298baac061 add rollovers for health/production 2011-03-05 13:19:13 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Chris Forbes
a515f95aed adjust range circle rendering 2011-02-11 07:11:29 +13:00
Paul Chote
2daeb45bfe Fix a subtle bug with flying units in spatialbins. Fixes #489. 2011-02-01 22:06:09 +13:00
Paul Chote
2c0a928b48 Fix terrain being drawn using the cursor palette. 2011-01-27 20:50:02 +13:00
Paul Chote
6776d6f906 Load the main menu without loading mixes or creating a shellmap world. A giant hack. 2011-01-27 20:50:00 +13:00
Chris Forbes
dcec748911 fix #436 bridges in wrong place in render sequence 2010-12-20 19:43:25 +13:00
Paul Chote
c6fad7fe98 Render IPreRenderSelection independently of OG. 2010-12-07 21:45:03 +13:00