Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, AndrewAMD), 770 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 23 of 32 1 2 21 22 23 24 25 31 32
Re: C# wrapper [Re: pararealist] #310986
02/18/10 00:57
02/18/10 00:57
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Hm, I see. Luckily it's not fatal.

Another question:
Can I assign pointers to engine object parameters?

e.g.
Code:
override public unsafe void createComponent(int *posX, int *posY)
{
  BMAP myMap = EngFun.bmap_create("component.tga");

  myPan = EngFun.pan_create(null, 1);
  myPan.bmap = myMap;
  myPan.flags |= Flags.VISIBLE;
            
  myPan.pos_x.IntValue = *posX;
  myPan.pos_y.IntValue = *posY;
}



If the application behind the interface then changes the integers given through the function, the panel should move... but nothing appears to happen. Is it jammed at the IntValue part?

EDIT:
Nvm, I see now that I -sort of- can't pull pointers out of classes.

Last edited by Joozey; 02/18/10 01:06.

Click and join the 3dgs irc community!
Room: #3dgs
Re: C# wrapper [Re: Joozey] #311217
02/18/10 21:27
02/18/10 21:27
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
If you want to update an engine object when a variable changes, why not do it in the 'set' clause?

Re: C# wrapper [Re: DJBMASTER] #311233
02/18/10 23:56
02/18/10 23:56
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
What set clause? PANEL.pos_x needs to be *automatically* updated in my case.


Click and join the 3dgs irc community!
Room: #3dgs
Re: C# wrapper [Re: Joozey] #311238
02/19/10 02:02
02/19/10 02:02
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
To have it update you would need a while loop to set the pos_x to the value of the variable every frame. The way I suggest you do it is create a property for the variable, and update the pos_x within the set clause.

You could create a custom event which fires when the var changes.

Re: C# wrapper - RELEASE [Re: enrike] #311279
02/19/10 11:26
02/19/10 11:26
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
w
o
w


(^_^) that is impressive.

i downloaded it.

Re: C# wrapper - RELEASE [Re: mikaldinho] #311283
02/19/10 11:40
02/19/10 11:40
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
hmm, I'm interested in how you could extend the wrapper so that we can use DirectX functions. You can do that in lite-c, by calling draw_begin() and then calling DX functions. Instead of having to wrap d3dx9.dll for C#, maybe the D3D device created by the engine could be exposed so that we can use managed DirectX.

I'm going to need this so I can add blocks in the level editor of easy scripter. Any thoughts?

Last edited by DJBMASTER; 02/19/10 11:40.
Re: C# wrapper - RELEASE [Re: DJBMASTER] #311295
02/19/10 13:20
02/19/10 13:20
Joined: Feb 2010
Posts: 457
Norfolk,England
mikaldinho Offline
Senior Member
mikaldinho  Offline
Senior Member

Joined: Feb 2010
Posts: 457
Norfolk,England
it could work. i think with a bit of work then it will work

Re: C# wrapper - RELEASE [Re: mikaldinho] #312581
02/25/10 16:09
02/25/10 16:09
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
i tried it!
super

but whats about a statment like this:
Code:
ENTITY my = ent_create("guard.mdl",new Vector(0,0,50),null);
my.animate("stand", my.skill1, (Var)(int)EngFun.ent_anim_FLAGS.ANM_CYCLE);



or better:

Code:
ENTITY my = ent_create("guard.mdl",new Vector(0,0,50),null);
my.animate("stand", my.skill1, EngFun.ent_anim_FLAGS.ANM_CYCLE);


Richi007

Last edited by Richi007; 02/25/10 16:09.

Visit my site: www.masterq32.de
Re: C# wrapper - RELEASE [Re: MasterQ32] #312623
02/25/10 17:45
02/25/10 17:45
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
you mean, you would like to have certain methods as class methods from ENTITY ?


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: C# wrapper - RELEASE [Re: Stromausfall] #312964
02/27/10 10:35
02/27/10 10:35
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
yes, because the meaning of the code is much cleaner und you don't need the EngFun everytime.
An the code will be smaller, so you don't have to write as much as in the actual way.


Visit my site: www.masterq32.de
Page 23 of 32 1 2 21 22 23 24 25 31 32

Moderated by  TWO 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1