Jump to content
  • Advertisement

Michael Marchesan

  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Michael Marchesan

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Michael Marchesan

    Having issues adding a class method

    ouch i must have missed that part in the docs, thanks!
  2. Michael Marchesan

    C++/Linux which IDE are you using or would you recommend ?

    If you're willing to not totally ditch Microsoft and give them a try, there's a feature in Windows 10 that is so underrated most Linux users didn't even hear of it: Windows Subsystem for Linux (WSL). You can have an effectively Linux environment in Windows, without a virtual machine. You can open bash console and that's literally like being on Linux. Any command line linux software can be installed and run; gui software is not officially supported but there's still ways to run it. Then you can use Visual Studio on Windows and configure it to work with WSL. That way Visual Studio can compile with a Linux OS target and the WSL can run the compiled program; and you have all the benefits of using one of the best c++ IDEs around. If you go through the process of making gui software work under WSL you can start Windows and use Linux out of it as if you started a Linux os, but you can also run any Windows software, including Visual Studio, without any emulation happening.
  3. Michael Marchesan

    Having issues adding a class method

    Hi, i'm trying to add angelscript to my graph viewing program; the scripts should be written by the user to interact with the graph in the program itself. Both graph and nodes already exist in the program, and the script shouldn't be able to delete them or create new ones directly. However the graph should have a couple methods through which the script can do so. in C++ graph.add_node() adds a node to the graph and returns a pointer to it, graph.remove_node(node*) removes the node. graph.get_first_node() returns a pointer to the first node in the list, as starting point for algorithms. node.get_neighbour(unsigned int n) returns a pointer to the nth node connected to that node. But when i try to register any of these methods that return a pointer to a node i get errors. engine->RegisterObjectType("graph", 0, asOBJ_REF); engine->RegisterObjectType("node", 0, asOBJ_REF); engine->RegisterObjectBehaviour("graph", asBEHAVE_ADDREF, "void f()", asMETHOD(graph, AddRef), asCALL_THISCALL); engine->RegisterObjectBehaviour("graph", asBEHAVE_RELEASE, "void f()", asMETHOD(graph, ReleaseRef), asCALL_THISCALL); engine->RegisterObjectBehaviour("node", asBEHAVE_ADDREF, "void f()", asMETHOD(graph::node, AddRef), asCALL_THISCALL); engine->RegisterObjectBehaviour("node", asBEHAVE_RELEASE, "void f()", asMETHOD(graph::node, ReleaseRef), asCALL_THISCALL); engine->RegisterObjectMethod("graph", "int test()", asMETHOD(graph, test), asCALL_THISCALL); engine->RegisterObjectMethod("graph", "node* get_first_node()", asMETHOD(graph, get_first_node), asCALL_THISCALL); engine->RegisterObjectMethod("node", "int test()", asMETHOD(graph::node, test), asCALL_THISCALL); engine->RegisterGlobalProperty("graph g", g); Error: Failed in call to function 'RegisterObjectMethod' with 'graph' and 'node* get_first_node()' (Code: asINVALID_DECLARATION, -10) It does so with and without * What am i doing wrong?
  4. Michael Marchesan

    register subset of stl to angelscript

    Exactly what i was looking for, thanks!
  5. Michael Marchesan

    register subset of stl to angelscript

    Hi, is there any available prewritten code that focuses on bringing most common stl features to angelscript? I'm mostly thinking of template containers (list, vector, map, queue, stack, set ...), algorithm, string, possibly iterators. Did anyone do a comprehensive stl register .h/.cpp, is anyone working on it, or i'll be the one to do it? I whish not the last one because i found out about angelscript right now...
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!