|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: Stromausfall]
#281605
07/27/09 20:13
07/27/09 20:13
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
yeh, but it still shows the window momentarily. I think this is required to start rendering. I'll see if i can hack with win32.
Thanks.
Last edited by DJBMASTER; 07/27/09 20:14.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: Stromausfall]
#281726
07/28/09 10:28
07/28/09 10:28
|
Joined: Dec 2006
Posts: 434 UK,Terra, SolarSystem, Milky W...
pararealist
Senior Member
|
Senior Member
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
|
Hi Stromausfall Dont know if you would like to add this to manual as the add_folders() (have never) dont seem to work outside Lite-C. // Setting up paths in C# First create your folders in your bin/debug bin/release folder. then:
//
public static String levels = Application.StartupPath + @"\gsDefaults\levels\";
public static String models = Application.StartupPath + @"\gsDefaults\models\";
public static String terrains = Application.StartupPath + @"\gsDefaults\terrains\";
public static String props = Application.StartupPath + @"\gsDefaults\props\";
public static String textures = Application.StartupPath + @"\gsDefaults\textures\";
public static String fx = Application.StartupPath + @"\gsDefaults\fx\";
public static String ppfx = Application.StartupPath + @"\gsDefaults\pp_fx\";
Then use like so
public static String strDefLevel = levels + "default.wmb";
public static String strDefEntity = models + "camnode.mdl";
OR
Actor = EngFun.ent_create(models + "cbabe.mdl", new Vector(0, 0, 32), ActorAction);
A8.3x Commercial, AcknexWrapper and VS 2010 Express ○pararealist now.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: pararealist]
#281732
07/28/09 11:11
07/28/09 11:11
|
Joined: Dec 2002
Posts: 616 Austria
Stromausfall
OP
User
|
OP
User
Joined: Dec 2002
Posts: 616
Austria
|
i will add it to the manual as "add_folder alternative"! thank you!
Last edited by Stromausfall; 07/28/09 11:24.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: Stromausfall]
#281733
07/28/09 11:23
07/28/09 11:23
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
hi, how can i create a sky entity? I'm using this Lite-C code...
ENTITY* skycube =
{
type = "t_day_sky+6.tga"; // the image for a backdrop scene
flags2 = SKY | CUBE | SHOW; // sky cube, visible
}
...how can i do this in C#. The ENTITY doesn't have a SKY property. Also if i set ENTITY.type = "t_day_sky+6.tga";, it results in a Marshalling Exception. Thanks.
Last edited by DJBMASTER; 07/28/09 11:24.
|
|
|
Re: C# wrapper - RELEASE 1.1.0
[Re: DJBMASTER]
#281737
07/28/09 11:54
07/28/09 11:54
|
Joined: Dec 2002
Posts: 616 Austria
Stromausfall
OP
User
|
OP
User
Joined: Dec 2002
Posts: 616
Austria
|
i found this via a7oogle in a thread ( http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&topic=27906&gonew=1) : //Make a Pretty Sky skycube = (ENTITY *)ent_createlayer("Sky_2+6.tga", _VAR(SKY | CUBE | VISIBLE), _VAR(0)); in c# it would then be ENTITY MySky = EngFun.ent_createlayer("Sky_2+6.tga", (Var)(1 << 17 | 1 << 20 | 1 << 14), (Var)0); In the next version this will be fixed and i will add an enum for CUBE SHOW and the other flags and i will also add a property for SKY which i somehow forgot ! In fact, you may also write it, like you will be able to in the next update of the wrapper (But you have change the enum FLAGS2 to public enum FLAGS2 in ENTITY.cs as workaround until the next update arrives ^^): ENTITY MySky = EngFun.ent_createlayer("Skycube+6.tga", (Var)(int)(ENTITY.FLAGS2.SKY | ENTITY.FLAGS2.SHOW | ENTITY.FLAGS2.CUBE), (Var)0);
Last edited by Stromausfall; 07/28/09 12:20.
|
|
|
|