Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 668 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 22 of 23 1 2 20 21 22 23
Re: C# wrapper 2.0 - RELEASE [Re: pararealist] #401085
05/13/12 11:16
05/13/12 11:16
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
mtl_hdr isn't directly implemented in the acknex engine, it's defined in the include/mtlView.c file in the acknex install folder.
To use mtl_hdr, you would have to simply transcribe/rewrite the effect to/in c#. If you're having problem with that, let me know !


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 2.0 - RELEASE [Re: Stromausfall] #401087
05/13/12 12:20
05/13/12 12:20
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Thought as much. I had started doing that(transcribe/rewrite the effect to/in c#. ), then came across the matrix problem.
I probably will get back to it sooner or later.
I am doing so many things at once, plus living as well.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
○pararealist now.
Re: C# wrapper 2.0 - RELEASE [Re: Stromausfall] #402278
06/01/12 16:33
06/01/12 16:33
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
Hey,
is it possible to document the use of a button event?
I don't get the syntax right. I tried
"public static IEnumerable<ScheduleMethod> SetMode(IntPtr ptr)"
It doesn't work.

Re: C# wrapper 2.0 - RELEASE [Re: jenGs] #402303
06/02/12 11:30
06/02/12 11:30
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
Something like this (a button with events that are triggered) ? Or something else ?

Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AcknexWrapper;

namespace ButtonExample
{
    class Program
    {
        private static BMAP button1On;
        private static BMAP button1Off;
        private static BMAP button1Over;
        private static PANEL mainPanel;

        private static IEnumerable<ScheduleMethod> buttonClick(double p)
        {
            Console.Write("button clicked");
            yield break;
        }

        private static IEnumerable<ScheduleMethod> buttonLeave(double p)
        {
            Console.WriteLine("mouse left button");
            yield break;
        }

        private static IEnumerable<ScheduleMethod> buttonOver(double p)
        {
            Console.WriteLine("mouse is over the button");
            yield break;
        }

        private static void CreatePushButton()
        {
            // create BMAPS for button (and change their color)
            Program.button1On =
                BMAP.bmap_createblack(200, 200, 32);
            Program.button1Off =
                BMAP.bmap_createblack(200, 200, 32);
            Program.button1Over =
                BMAP.bmap_createblack(200, 200, 32);

            Program.button1On.bmap_fill(new Color(200, 0, 0), 100);
            Program.button1Off.bmap_fill(new Color(100, 0, 0), 100);
            Program.button1Over.bmap_fill(new Color(150, 0, 0), 100);

            // create a button in the panel
            Program.mainPanel.pan_setbutton(
                0,
                1,
                50,
                50,
                Program.button1On,
                Program.button1Off,
                Program.button1Over,
                Program.button1On,
                Program.buttonClick,
                Program.buttonLeave,
                Program.buttonOver);
        }

        //the main method, called by the scheduler
        private static IEnumerable<ScheduleMethod> myMainMethod()
        {
            // create the main panel and make it visible
            Program.mainPanel =
                PANEL.pan_create(null, 1);
            Program.mainPanel.SHOW = true;
            Program.mainPanel.size_x = EngVar.screen_size.x;
            Program.mainPanel.size_y = EngVar.screen_size.y;

            // Shows how to create a simple push button and assign functions to it
            Program.CreatePushButton();

            // use mouse !!
            EngVar.mouse_mode = 4;

            yield break;
        }

        static void Main(string[] args)
        {
            //open the engine
            EngFun.engine_open(null, null);

            //start the scheduler
            Scheduler.StartScheduler(myMainMethod);
        }
    }
}




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 2.0 - RELEASE [Re: Stromausfall] #402312
06/02/12 13:52
06/02/12 13:52
Joined: Jul 2010
Posts: 283
Germany
J
jenGs Offline
Member
jenGs  Offline
Member
J

Joined: Jul 2010
Posts: 283
Germany
Ahh, yes. the parameter is a double ... never guessed that.
Ah, now I looked into the source code and saw it.
Thank you for your help.
Is it possible, that the engine is slower since the last update?

Re: C# wrapper 2.0 - RELEASE [Re: jenGs] #402347
06/02/12 22:49
06/02/12 22:49
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
hmmm i can't imagine that the update could have affected the speed...
do you have an idea where the bottle neck could be ?


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 2.0 - RELEASE [Re: Stromausfall] #402514
06/06/12 14:34
06/06/12 14:34
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
a new version was uploaded (for Acknex 7.85.4 AND Acknex 8.30.4)
the update of the wrapper includes:

- changing Scheduling of method now also possible without a previous "yield return 1" – big thanks to Timothy and pararealist

here's the link:

AcknexWrapper_2_3_9_FOR_8_30_4_AND_7_85_4.zip


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 2.0 - RELEASE [Re: Stromausfall] #402565
06/07/12 07:15
06/07/12 07:15
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
Thanks.


A8.3x Commercial, AcknexWrapper and VS 2010 Express
&#9675;pararealist now.
Re: C# wrapper 2.0 - RELEASE [Re: pararealist] #432560
11/08/13 10:45
11/08/13 10:45
Joined: Apr 2006
Posts: 159
Latvija
Arrovs Offline
Member
Arrovs  Offline
Member

Joined: Apr 2006
Posts: 159
Latvija
I have small question.
Engine objects like PANEL, TEXT and others gets managed by garbage collector or i need to remove them myself still, when usign C# and this wrapper.


Arrovs once will publish game
Re: C# wrapper 2.0 - RELEASE [Re: Arrovs] #432589
11/08/13 18:15
11/08/13 18:15
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
now they only wrap the objects so you have to delete them with the matching functions (like in lite-c)


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
Page 22 of 23 1 2 20 21 22 23

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