Load the main menu without loading mixes or creating a shellmap world. A giant hack.
This commit is contained in:
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Graphics
|
||||
{
|
||||
class HardwarePalette
|
||||
public class HardwarePalette
|
||||
{
|
||||
public const int MaxPalettes = 64;
|
||||
int allocated = 0;
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Graphics
|
||||
Dictionary<string, Palette> palettes;
|
||||
Dictionary<string, int> indices;
|
||||
|
||||
public HardwarePalette(Map map)
|
||||
public HardwarePalette()
|
||||
{
|
||||
palettes = new Dictionary<string, Palette>();
|
||||
indices = new Dictionary<string, int>();
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
public class SpriteLoader
|
||||
{
|
||||
public SpriteLoader( TileSet tileset, SheetBuilder sheetBuilder )
|
||||
public SpriteLoader( string[] exts, SheetBuilder sheetBuilder )
|
||||
{
|
||||
exts = tileset.Extensions;
|
||||
SheetBuilder = sheetBuilder;
|
||||
SheetBuilder = sheetBuilder;
|
||||
this.exts = exts;
|
||||
sprites = new Cache<string, Sprite[]>( LoadSprites );
|
||||
}
|
||||
|
||||
|
||||
@@ -84,11 +84,12 @@ namespace OpenRA.Graphics
|
||||
public void DrawRegions( WorldRenderer wr, IInputHandler inputHandler )
|
||||
{
|
||||
renderer.BeginFrame(scrollPosition);
|
||||
if (wr != null)
|
||||
wr.Draw();
|
||||
|
||||
wr.Draw();
|
||||
Widget.DoDraw();
|
||||
var cursorName = Widget.RootWidget.GetCursorOuter(Viewport.LastMousePos) ?? "default";
|
||||
new Cursor(cursorName).Draw(wr, (int)cursorFrame, Viewport.LastMousePos + Location);
|
||||
new Cursor(cursorName).Draw((int)cursorFrame, Viewport.LastMousePos + Location);
|
||||
|
||||
renderer.EndFrame( inputHandler );
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Graphics
|
||||
terrainRenderer = new TerrainRenderer(world, this);
|
||||
shroudRenderer = new ShroudRenderer(world);
|
||||
uiOverlay = new UiOverlay();
|
||||
palette = new HardwarePalette(world.Map);
|
||||
this.palette = Game.modData.Palette;
|
||||
|
||||
foreach( var pal in world.traitDict.ActorsWithTraitMultiple<IPalette>( world ) )
|
||||
pal.Trait.InitPalette( this );
|
||||
|
||||
Reference in New Issue
Block a user