hack hack hack
git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1165 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -20,7 +20,7 @@ namespace OpenRa.Game
|
||||
Package TileMix;
|
||||
string TileSuffix;
|
||||
|
||||
const string mapName = "scg11eb.ini";
|
||||
const string mapName = "scm12ea.ini";
|
||||
const string shaderName = "diffuse.fx";
|
||||
|
||||
Dictionary<TileReference, SheetRectangle<Sheet>> tileMapping =
|
||||
@@ -33,6 +33,9 @@ namespace OpenRa.Game
|
||||
Effect effect;
|
||||
IntPtr texture, scroll, r1h, r2h;
|
||||
|
||||
World world;
|
||||
TreeRenderer treeRenderer;
|
||||
|
||||
void LoadTextures()
|
||||
{
|
||||
List<Sheet> tempSheets = new List<Sheet>();
|
||||
@@ -66,6 +69,12 @@ namespace OpenRa.Game
|
||||
|
||||
foreach (Sheet s in tempSheets)
|
||||
s.LoadTexture(device);
|
||||
|
||||
world = new World(device);
|
||||
treeRenderer = new TreeRenderer(device, map, TileMix, pal);
|
||||
|
||||
foreach (TreeReference treeReference in map.Trees)
|
||||
world.Add(new Tree(treeReference, treeRenderer, map));
|
||||
}
|
||||
|
||||
float U(SheetRectangle<Sheet> s, float u)
|
||||
@@ -127,7 +136,7 @@ namespace OpenRa.Game
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
ClientSize = new Size(1280, 800);
|
||||
ClientSize = new Size(1280,800);
|
||||
|
||||
Visible = true;
|
||||
|
||||
@@ -249,6 +258,18 @@ namespace OpenRa.Game
|
||||
effect.EndPass();
|
||||
effect.End();
|
||||
|
||||
effect.Quality = ShaderQuality.High;
|
||||
effect.Begin();
|
||||
effect.BeginPass(0);
|
||||
|
||||
effect.SetTexture(texture, treeRenderer.sh.texture);
|
||||
effect.Commit();
|
||||
|
||||
world.Draw();
|
||||
|
||||
effect.EndPass();
|
||||
effect.End();
|
||||
|
||||
device.End();
|
||||
device.Present();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user