git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1146 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -207,6 +207,8 @@ namespace OpenRa.Game
|
|||||||
return ok ? enumerator.Current : default(T);
|
return ok ? enumerator.Current : default(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int n = 1;
|
||||||
|
|
||||||
void Frame()
|
void Frame()
|
||||||
{
|
{
|
||||||
Clock.StartFrame();
|
Clock.StartFrame();
|
||||||
@@ -221,7 +223,8 @@ namespace OpenRa.Game
|
|||||||
|
|
||||||
effect.SetValue(scroll, scrollPos);
|
effect.SetValue(scroll, scrollPos);
|
||||||
|
|
||||||
foreach (KeyValuePair<Sheet, IndexBuffer> batch in drawBatches)
|
KeyValuePair<Sheet, IndexBuffer> batch = Nth(drawBatches, n);
|
||||||
|
//foreach (KeyValuePair<Sheet, IndexBuffer> batch in drawBatches)
|
||||||
{
|
{
|
||||||
effect.SetTexture(texture, batch.Key.texture);
|
effect.SetTexture(texture, batch.Key.texture);
|
||||||
effect.Commit();
|
effect.Commit();
|
||||||
@@ -249,33 +252,26 @@ namespace OpenRa.Game
|
|||||||
|
|
||||||
if (e.KeyCode == Keys.C)
|
if (e.KeyCode == Keys.C)
|
||||||
Clock.Reset();
|
Clock.Reset();
|
||||||
|
|
||||||
|
if (e.KeyCode == Keys.A)
|
||||||
|
n++;
|
||||||
|
|
||||||
|
if (e.KeyCode == Keys.Z)
|
||||||
|
if (--n < 0)
|
||||||
|
n = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
TileSet LoadTileSet(Map currentMap)
|
TileSet LoadTileSet(Map currentMap)
|
||||||
{
|
{
|
||||||
switch (currentMap.Theater.ToLowerInvariant())
|
string theaterName = currentMap.Theater;
|
||||||
{
|
if (theaterName.Length > 8)
|
||||||
case "temperate":
|
theaterName = theaterName.Substring(0, 8);
|
||||||
pal = new Palette(File.OpenRead("../../../temperat.pal"));
|
|
||||||
TileMix = new Package("../../../temperat.mix");
|
pal = new Palette(File.OpenRead("../../../" + theaterName + ".pal"));
|
||||||
TileSuffix = ".tem";
|
TileMix = new Package("../../../" + theaterName + ".mix");
|
||||||
break;
|
TileSuffix = "." + theaterName.Substring(0, 3);
|
||||||
case "snow":
|
|
||||||
pal = new Palette(File.OpenRead("../../../snow.pal"));
|
|
||||||
TileMix = new Package("../../../snow.mix");
|
|
||||||
TileSuffix = ".sno";
|
|
||||||
break;
|
|
||||||
case "interior":
|
|
||||||
pal = new Palette(File.OpenRead("../../../interior.pal"));
|
|
||||||
TileMix = new Package("../../../interior.mix");
|
|
||||||
TileSuffix = ".int";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
return new TileSet(TileMix, TileSuffix, pal);
|
return new TileSet(TileMix, TileSuffix, pal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user