untangling WorldRenderer from World
This commit is contained in:
@@ -6,19 +6,19 @@
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Server;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
using OpenRA.Server;
|
||||
using OpenRA.Support;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace OpenRA
|
||||
|
||||
public static ModData modData;
|
||||
public static World world;
|
||||
public static WorldRenderer worldRenderer;
|
||||
|
||||
public static Viewport viewport;
|
||||
public static Settings Settings;
|
||||
|
||||
@@ -48,6 +50,7 @@ namespace OpenRA
|
||||
|
||||
viewport = new Viewport(new float2(Renderer.Resolution), map.TopLeft, map.BottomRight, Renderer);
|
||||
world = new World(modData.Manifest, map, orderManager);
|
||||
worldRenderer = new WorldRenderer(world);
|
||||
}
|
||||
|
||||
public static void MoveViewport(int2 loc)
|
||||
@@ -92,18 +95,18 @@ namespace OpenRA
|
||||
internal static int RenderFrame = 0;
|
||||
internal static int LocalTick = 0;
|
||||
const int NetTickScale = 3; // 120ms net tick for 40ms local tick
|
||||
|
||||
internal static event Action<OrderManager> ConnectionStateChanged = _ => { };
|
||||
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
|
||||
|
||||
internal static event Action<OrderManager> ConnectionStateChanged = _ => { };
|
||||
static ConnectionState lastConnectionState = ConnectionState.PreConnecting;
|
||||
public static int LocalClientId { get { return orderManager.Connection.LocalClientId; } }
|
||||
|
||||
static void Tick( World world, OrderManager orderManager, Viewport viewPort )
|
||||
{
|
||||
if (orderManager.Connection.ConnectionState != lastConnectionState)
|
||||
{
|
||||
lastConnectionState = orderManager.Connection.ConnectionState;
|
||||
ConnectionStateChanged( orderManager );
|
||||
}
|
||||
if (orderManager.Connection.ConnectionState != lastConnectionState)
|
||||
{
|
||||
lastConnectionState = orderManager.Connection.ConnectionState;
|
||||
ConnectionStateChanged( orderManager );
|
||||
}
|
||||
|
||||
int t = Environment.TickCount;
|
||||
int dt = t - lastTime;
|
||||
@@ -131,6 +134,7 @@ namespace OpenRA
|
||||
world.OrderGenerator.Tick(world);
|
||||
world.Selection.Tick(world);
|
||||
world.Tick();
|
||||
worldRenderer.Tick();
|
||||
|
||||
PerfHistory.Tick();
|
||||
}
|
||||
@@ -143,7 +147,7 @@ namespace OpenRA
|
||||
using (new PerfSample("render"))
|
||||
{
|
||||
++RenderFrame;
|
||||
viewport.DrawRegions(world.WorldRenderer, world);
|
||||
viewport.DrawRegions(worldRenderer, world);
|
||||
Sound.SetListenerPosition(viewport.Location + .5f * new float2(viewport.Width, viewport.Height));
|
||||
}
|
||||
|
||||
@@ -174,9 +178,9 @@ namespace OpenRA
|
||||
if (orderManager.GameStarted) return;
|
||||
Widget.SelectedWidget = null;
|
||||
|
||||
LocalTick = 0;
|
||||
LocalTick = 0;
|
||||
|
||||
orderManager.StartGame();
|
||||
orderManager.StartGame();
|
||||
viewport.RefreshPalette();
|
||||
AfterGameStart( world );
|
||||
}
|
||||
@@ -221,24 +225,24 @@ namespace OpenRA
|
||||
|
||||
internal static void Initialize(Arguments args)
|
||||
{
|
||||
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
||||
|
||||
var defaultSupport = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||
+ Path.DirectorySeparatorChar + "OpenRA";
|
||||
|
||||
SupportDir = args.GetValue("SupportDir", defaultSupport);
|
||||
Settings = new Settings(SupportDir + "settings.yaml", args);
|
||||
|
||||
AppDomain.CurrentDomain.AssemblyResolve += FileSystem.ResolveAssembly;
|
||||
|
||||
var defaultSupport = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||
+ Path.DirectorySeparatorChar + "OpenRA";
|
||||
|
||||
SupportDir = args.GetValue("SupportDir", defaultSupport);
|
||||
Settings = new Settings(SupportDir + "settings.yaml", args);
|
||||
|
||||
// force master server upgrade -- remove once everyone is switched over.
|
||||
if (Settings.Server.MasterServer == "http://open-ra.org/master/")
|
||||
Settings.Server.MasterServer = "http://master.open-ra.org/";
|
||||
|
||||
Settings.Save();
|
||||
|
||||
Log.LogPath = SupportDir + "Logs" + Path.DirectorySeparatorChar;
|
||||
Log.AddChannel("perf", "perf.log");
|
||||
Log.AddChannel("debug", "debug.log");
|
||||
Log.AddChannel("sync", "syncreport.log");
|
||||
Settings.Save();
|
||||
|
||||
Log.LogPath = SupportDir + "Logs" + Path.DirectorySeparatorChar;
|
||||
Log.AddChannel("perf", "perf.log");
|
||||
Log.AddChannel("debug", "debug.log");
|
||||
Log.AddChannel("sync", "syncreport.log");
|
||||
|
||||
FileSystem.Mount("."); // Needed to access shaders
|
||||
Renderer.Initialize( Game.Settings.Graphics.Mode );
|
||||
@@ -259,13 +263,14 @@ namespace OpenRA
|
||||
PerfHistory.items["render"].hasNormalTick = false;
|
||||
PerfHistory.items["batches"].hasNormalTick = false;
|
||||
PerfHistory.items["text"].hasNormalTick = false;
|
||||
PerfHistory.items["cursor"].hasNormalTick = false;
|
||||
|
||||
PerfHistory.items["cursor"].hasNormalTick = false;
|
||||
|
||||
|
||||
JoinLocal();
|
||||
StartGame(modData.Manifest.ShellmapUid);
|
||||
|
||||
Game.AfterGameStart += world => Widget.OpenWindow("INGAME_ROOT", new Dictionary<string,object>{{"world", world}});
|
||||
Game.AfterGameStart += world => Widget.OpenWindow("INGAME_ROOT", new Dictionary<string,object>{{"world", world}});
|
||||
|
||||
Game.ConnectionStateChanged += orderManager =>
|
||||
{
|
||||
Widget.CloseWindow();
|
||||
@@ -309,13 +314,13 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void Exit() { quit = true; }
|
||||
public static void Exit() { quit = true; }
|
||||
|
||||
public static Action<Color,string,string> AddChatLine = (c,n,s) => {};
|
||||
|
||||
|
||||
public static void Debug(string s, params object[] args)
|
||||
{
|
||||
public static void Debug(string s, params object[] args)
|
||||
{
|
||||
AddChatLine(Color.White, "Debug", String.Format(s,args));
|
||||
}
|
||||
|
||||
public static void Disconnect()
|
||||
@@ -327,25 +332,25 @@ namespace OpenRA
|
||||
|
||||
Widget.CloseWindow();
|
||||
Widget.OpenWindow("MAINMENU_BG");
|
||||
Widget.OpenWindow("MAINMENU_BG");
|
||||
}
|
||||
|
||||
static string baseSupportDir = null;
|
||||
public static string SupportDir
|
||||
{
|
||||
set
|
||||
{
|
||||
var dir = value;
|
||||
|
||||
// Expand paths relative to the personal directory
|
||||
if (dir.ElementAt(0) == '~')
|
||||
dir = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + dir.Substring(1);
|
||||
|
||||
if (!Directory.Exists(dir))
|
||||
Directory.CreateDirectory(dir);
|
||||
|
||||
}
|
||||
|
||||
static string baseSupportDir = null;
|
||||
public static string SupportDir
|
||||
{
|
||||
set
|
||||
{
|
||||
var dir = value;
|
||||
|
||||
// Expand paths relative to the personal directory
|
||||
if (dir.ElementAt(0) == '~')
|
||||
dir = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + dir.Substring(1);
|
||||
|
||||
if (!Directory.Exists(dir))
|
||||
Directory.CreateDirectory(dir);
|
||||
|
||||
baseSupportDir = dir + Path.DirectorySeparatorChar;
|
||||
}
|
||||
}
|
||||
get { return baseSupportDir; }
|
||||
}
|
||||
|
||||
public static T CreateObject<T>( string name )
|
||||
@@ -353,4 +358,4 @@ namespace OpenRA
|
||||
return modData.ObjectCreator.CreateObject<T>( name );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace OpenRA.Graphics
|
||||
|
||||
public void RefreshPalette()
|
||||
{
|
||||
Game.world.WorldRenderer.palette.Update(
|
||||
Game.worldRenderer.palette.Update(
|
||||
Game.world.WorldActor.TraitsImplementing<IPaletteModifier>());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace OpenRA.Graphics
|
||||
terrainRenderer = new TerrainRenderer(world, this);
|
||||
uiOverlay = new UiOverlay();
|
||||
palette = new HardwarePalette(world.Map);
|
||||
|
||||
foreach( var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>( world ) )
|
||||
pal.Trait.InitPalette( this );
|
||||
}
|
||||
|
||||
public int GetPaletteIndex(string name) { return palette.GetPaletteIndex(name); }
|
||||
|
||||
@@ -63,7 +63,6 @@ namespace OpenRA
|
||||
|
||||
PlayerRef = pr;
|
||||
|
||||
RegisterPlayerColor(world, Palette);
|
||||
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
|
||||
}
|
||||
|
||||
@@ -85,18 +84,9 @@ namespace OpenRA
|
||||
ClientIndex = client.Index;
|
||||
PlayerRef = pr;
|
||||
|
||||
RegisterPlayerColor(world, Palette);
|
||||
PlayerActor = world.CreateActor("Player", new TypeDictionary{ new OwnerInit( this ) });
|
||||
}
|
||||
|
||||
public void RegisterPlayerColor(World world, string palette)
|
||||
{
|
||||
var info = Rules.Info["world"].Traits.Get<PlayerColorPaletteInfo>();
|
||||
var newpal = new Palette(world.WorldRenderer.GetPalette(info.BasePalette),
|
||||
new PlayerColorRemap(Color, Color2, info.PaletteFormat));
|
||||
world.WorldRenderer.AddPalette(palette, newpal);
|
||||
}
|
||||
|
||||
public void GiveAdvice(string advice)
|
||||
{
|
||||
Sound.PlayToPlayer(this, advice);
|
||||
|
||||
@@ -105,6 +105,7 @@ namespace OpenRA.Traits
|
||||
public interface IDamageModifier { float GetDamageModifier( WarheadInfo warhead ); }
|
||||
public interface ISpeedModifier { float GetSpeedModifier(); }
|
||||
public interface IFirepowerModifier { float GetFirepowerModifier(); }
|
||||
public interface IPalette { void InitPalette( WorldRenderer wr ); }
|
||||
public interface IPaletteModifier { void AdjustPalette(Dictionary<string,Palette> b); }
|
||||
public interface IPips { IEnumerable<PipType> GetPips(Actor self); }
|
||||
public interface ITags { IEnumerable<TagType> GetTags(); }
|
||||
|
||||
@@ -9,13 +9,34 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
public class PlayerColorPaletteInfo : TraitInfo<PlayerColorPalette>
|
||||
public class PlayerColorPaletteInfo : ITraitInfo
|
||||
{
|
||||
public readonly string BasePalette = null;
|
||||
public readonly string BaseName = "player";
|
||||
public readonly PaletteFormat PaletteFormat = PaletteFormat.ra;
|
||||
|
||||
public object Create( ActorInitializer init ) { return new PlayerColorPalette( init.self.Owner, this ); }
|
||||
}
|
||||
|
||||
public class PlayerColorPalette {}
|
||||
public class PlayerColorPalette : IPalette
|
||||
{
|
||||
readonly Player owner;
|
||||
readonly PlayerColorPaletteInfo info;
|
||||
public PlayerColorPalette( Player owner, PlayerColorPaletteInfo info )
|
||||
{
|
||||
this.owner = owner;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void InitPalette( WorldRenderer wr )
|
||||
{
|
||||
var paletteName = "{0}{1}".F( info.BaseName, owner.Index );
|
||||
var newpal = new Palette(wr.GetPalette(info.BasePalette),
|
||||
new PlayerColorRemap(owner.Color, owner.Color2, info.PaletteFormat));
|
||||
wr.AddPalette(paletteName, newpal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace OpenRA.Widgets
|
||||
cachedFrame = frame;
|
||||
}
|
||||
|
||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(sprite,RenderOrigin, Game.world.WorldRenderer, palette);
|
||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(sprite,RenderOrigin, Game.worldRenderer, palette);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Widgets
|
||||
|
||||
public static void DrawSHP(Sprite s, float2 pos)
|
||||
{
|
||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(s,pos, Game.world.WorldRenderer, "chrome");
|
||||
Game.Renderer.WorldSpriteRenderer.DrawSprite(s,pos, Game.worldRenderer, "chrome");
|
||||
}
|
||||
|
||||
public static void DrawPanel(string collection, Rectangle Bounds)
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace OpenRA.Widgets
|
||||
Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White);
|
||||
|
||||
foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second))
|
||||
world.WorldRenderer.DrawSelectionBox(u, Color.Yellow);
|
||||
Game.worldRenderer.DrawSelectionBox(u, Color.Yellow);
|
||||
}
|
||||
|
||||
float2 dragStart, dragEnd;
|
||||
|
||||
@@ -57,8 +57,6 @@ namespace OpenRA
|
||||
public readonly Map Map;
|
||||
public readonly TileSet TileSet;
|
||||
|
||||
public readonly WorldRenderer WorldRenderer;
|
||||
|
||||
IOrderGenerator orderGenerator_;
|
||||
public IOrderGenerator OrderGenerator
|
||||
{
|
||||
@@ -97,8 +95,6 @@ namespace OpenRA
|
||||
TileSet = Rules.TileSets[Map.Tileset];
|
||||
TileSet.LoadTiles();
|
||||
|
||||
WorldRenderer = new WorldRenderer(this);
|
||||
|
||||
WorldActor = CreateActor( "World", new TypeDictionary() );
|
||||
Queries = new AllQueries(this);
|
||||
|
||||
@@ -170,8 +166,6 @@ namespace OpenRA
|
||||
Game.viewport.Tick();
|
||||
while (frameEndActions.Count != 0)
|
||||
frameEndActions.Dequeue()(this);
|
||||
|
||||
WorldRenderer.Tick();
|
||||
}
|
||||
|
||||
public IEnumerable<Actor> Actors { get { return actors; } }
|
||||
|
||||
@@ -11,21 +11,21 @@
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Widgets.Delegates;
|
||||
using OpenRA.Widgets.Delegates;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class ColorPickerPaletteModifierInfo : TraitInfo<ColorPickerPaletteModifier> {}
|
||||
|
||||
class ColorPickerPaletteModifier : IPaletteModifier, IWorldLoaded
|
||||
class ColorPickerPaletteModifier : IPalette, IPaletteModifier
|
||||
{
|
||||
PaletteFormat format;
|
||||
public void WorldLoaded(World w)
|
||||
{
|
||||
// Copy the base palette for the colorpicker
|
||||
var info = Rules.Info["world"].Traits.Get<PlayerColorPaletteInfo>();
|
||||
public void InitPalette( WorldRenderer wr )
|
||||
{
|
||||
var info = Rules.Info["player"].Traits.Get<PlayerColorPaletteInfo>();
|
||||
format = info.PaletteFormat;
|
||||
w.WorldRenderer.AddPalette("colorpicker", w.WorldRenderer.GetPalette(info.BasePalette));
|
||||
wr.AddPalette("colorpicker", wr.GetPalette(info.BasePalette));
|
||||
}
|
||||
|
||||
public void AdjustPalette(Dictionary<string, Palette> palettes)
|
||||
@@ -33,6 +33,6 @@ namespace OpenRA.Mods.RA
|
||||
palettes["colorpicker"] = new Palette(palettes["colorpicker"],
|
||||
new PlayerColorRemap(LobbyDelegate.CurrentColorPreview1,
|
||||
LobbyDelegate.CurrentColorPreview2, format));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,12 +21,20 @@ namespace OpenRA.Mods.RA
|
||||
public object Create(ActorInitializer init) { return new PaletteFromCurrentTheatre(init.world, this); }
|
||||
}
|
||||
|
||||
class PaletteFromCurrentTheatre
|
||||
{
|
||||
class PaletteFromCurrentTheatre : IPalette
|
||||
{
|
||||
readonly World world;
|
||||
readonly PaletteFromCurrentTheatreInfo info;
|
||||
|
||||
public PaletteFromCurrentTheatre(World world, PaletteFromCurrentTheatreInfo info)
|
||||
{
|
||||
world.WorldRenderer.AddPalette(info.Name,
|
||||
new Palette(FileSystem.Open(world.TileSet.Palette), info.Transparent));
|
||||
}
|
||||
{
|
||||
this.world = world;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void InitPalette( OpenRA.Graphics.WorldRenderer wr )
|
||||
{
|
||||
wr.AddPalette( info.Name, new Palette( FileSystem.Open( world.TileSet.Palette ), info.Transparent ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
@@ -23,16 +24,20 @@ namespace OpenRA.Mods.RA
|
||||
public object Create(ActorInitializer init) { return new PaletteFromFile(init.world, this); }
|
||||
}
|
||||
|
||||
class PaletteFromFile
|
||||
class PaletteFromFile : IPalette
|
||||
{
|
||||
readonly World world;
|
||||
readonly PaletteFromFileInfo info;
|
||||
public PaletteFromFile(World world, PaletteFromFileInfo info)
|
||||
{
|
||||
if (info.Theater == null ||
|
||||
info.Theater.ToLowerInvariant() == world.Map.Theater.ToLowerInvariant())
|
||||
{
|
||||
world.WorldRenderer.AddPalette(info.Name,
|
||||
new Palette(FileSystem.Open(info.Filename), info.Transparent));
|
||||
}
|
||||
this.world = world;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void InitPalette( WorldRenderer wr )
|
||||
{
|
||||
if( info.Theater == null || info.Theater.ToLowerInvariant() == world.Map.Theater.ToLowerInvariant() )
|
||||
wr.AddPalette( info.Name, new Palette( FileSystem.Open( info.Filename ), info.Transparent ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
@@ -26,15 +27,21 @@ namespace OpenRA.Mods.RA
|
||||
public object Create(ActorInitializer init) { return new PaletteFromRGBA(init.world, this); }
|
||||
}
|
||||
|
||||
class PaletteFromRGBA
|
||||
class PaletteFromRGBA : IPalette
|
||||
{
|
||||
readonly World world;
|
||||
readonly PaletteFromRGBAInfo info;
|
||||
public PaletteFromRGBA(World world, PaletteFromRGBAInfo info)
|
||||
{
|
||||
if (info.Theatre == null ||
|
||||
info.Theatre.ToLowerInvariant() == world.Map.Theater.ToLowerInvariant())
|
||||
this.world = world;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void InitPalette( WorldRenderer wr )
|
||||
{
|
||||
if (info.Theatre == null || info.Theatre.ToLowerInvariant() == world.Map.Theater.ToLowerInvariant())
|
||||
{
|
||||
// TODO: This shouldn't rely on a base palette
|
||||
var wr = world.WorldRenderer;
|
||||
var pal = wr.GetPalette("terrain");
|
||||
wr.AddPalette(info.Name, new Palette(pal, new SingleColorRemap(Color.FromArgb(info.A, info.R, info.G, info.B))));
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Graphics;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
@@ -18,17 +19,21 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public readonly string Name = "shroud";
|
||||
public readonly bool IsFog = false;
|
||||
public object Create(ActorInitializer init) { return new ShroudPalette(init.world, this); }
|
||||
public object Create(ActorInitializer init) { return new ShroudPalette(this); }
|
||||
}
|
||||
|
||||
class ShroudPalette
|
||||
class ShroudPalette : IPalette
|
||||
{
|
||||
public ShroudPalette(World world, ShroudPaletteInfo info)
|
||||
readonly ShroudPaletteInfo info;
|
||||
public ShroudPalette( ShroudPaletteInfo info )
|
||||
{
|
||||
// TODO: This shouldn't rely on a base palette
|
||||
var wr = world.WorldRenderer;
|
||||
var pal = wr.GetPalette("terrain");
|
||||
wr.AddPalette(info.Name, new Palette(pal, new ShroudPaletteRemap(info.IsFog)));
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public void InitPalette( WorldRenderer wr )
|
||||
{
|
||||
var pal = wr.GetPalette( "terrain" );
|
||||
wr.AddPalette( info.Name, new Palette( pal, new ShroudPaletteRemap( info.IsFog ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,12 @@ Player:
|
||||
ActorGroupProxy:
|
||||
DeveloperMode:
|
||||
HackyAI:
|
||||
|
||||
PlayerColorPalette:
|
||||
BasePalette: terrain
|
||||
PaletteFormat: cnc
|
||||
|
||||
World:
|
||||
ScreenShaker:
|
||||
ColorPickerPaletteModifier:
|
||||
NukePaletteEffect:
|
||||
WaterPaletteRotation:
|
||||
CncMode: true
|
||||
@@ -50,9 +52,6 @@ World:
|
||||
Bridges: bridge1, bridge2, bridge3, bridge4
|
||||
PaletteFromCurrentTheatre:
|
||||
Name: terrain
|
||||
PlayerColorPalette:
|
||||
BasePalette: terrain
|
||||
PaletteFormat: cnc
|
||||
PaletteFromFile@chrome:
|
||||
Name: chrome
|
||||
Filename: temperat.pal
|
||||
@@ -85,6 +84,7 @@ World:
|
||||
G: 0
|
||||
B: 0
|
||||
A: 180
|
||||
ColorPickerPaletteModifier:
|
||||
ShroudPalette@shroud:
|
||||
ShroudPalette@fog:
|
||||
IsFog: yes
|
||||
|
||||
@@ -98,11 +98,11 @@ Player:
|
||||
ActorGroupProxy:
|
||||
DeveloperMode:
|
||||
HackyAI:
|
||||
|
||||
PlayerColorPalette:
|
||||
BasePalette: terrain
|
||||
|
||||
World:
|
||||
ScreenShaker:
|
||||
ColorPickerPaletteModifier:
|
||||
WaterPaletteRotation:
|
||||
ChronoshiftPaletteEffect:
|
||||
NukePaletteEffect:
|
||||
@@ -119,8 +119,6 @@ World:
|
||||
WaterChance: .2
|
||||
PaletteFromCurrentTheatre:
|
||||
Name: terrain
|
||||
PlayerColorPalette:
|
||||
BasePalette: terrain
|
||||
PaletteFromFile@chrome:
|
||||
Name: chrome
|
||||
Filename: temperat.pal
|
||||
@@ -154,6 +152,7 @@ World:
|
||||
G: 0
|
||||
B: 0
|
||||
A: 180
|
||||
ColorPickerPaletteModifier:
|
||||
ShroudPalette@shroud:
|
||||
ShroudPalette@fog:
|
||||
IsFog: yes
|
||||
|
||||
Reference in New Issue
Block a user