|
using System;
using System.Drawing;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectDraw;
using DDW.DRAW;
namespace DDW.ENGINE
{
public class CWorld
{
public string m_Name;
public DDW.ENGINE.CEngine m_Engine=null;
public Microsoft.DirectX.DirectDraw.Device m_Device=null;
public DDW.DEBUG.CTrace m_Trace=null;
public DDW.DRAW.CSprite m_SPR_BackDrop=null;
public string m_WorldFileName="";
public string m_WorldName="";
public CWorld(CEngine e)
{
m_Engine=e;
if (this.m_Trace==null)
this.m_Trace = new DDW.DEBUG.CTrace();
}
~CWorld()
{
}
public System.Exception Create(string filename, string worldname)
{
try
{
m_SPR_BackDrop = new DDW.DRAW.CSprite(m_Engine.m_Device.m_Device);
m_SPR_BackDrop.Load("spr green","green01.bmp");
m_SPR_BackDrop.m_Width=512;
m_SPR_BackDrop.m_Heigth=512;
return null;
}
catch(Exception e)
{
this.m_Trace.T("CWorld::Create>"+e);
return e;
}
}
public System.Exception Draw(Microsoft.DirectX.DirectDraw.Surface s)
{
try
{
s.Draw(
new Rectangle(
0,
0,
1280,
1024
),
m_SPR_BackDrop.m_Surface.m_Surface,
new Rectangle(
0,
0,
m_SPR_BackDrop.m_Width,
m_SPR_BackDrop.m_Heigth
),
DrawFlags.KeySource|DrawFlags.Wait
);
return null;
}
catch(Exception e)
{
this.m_Trace.T("CWorld::Draw>"+e);
return e;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.