Miss

Members
  • Content count

    42
  • Joined

  • Last visited

Community Reputation

174 Neutral

About Miss

  • Rank
    Member

Personal Information

Social

  • Twitter
    codecatt
  • Github
    codecat
  1. Angelscript on Github!

    Good news everyone! AngelScript support has been merged into Linguist: https://github.com/github/linguist/pull/3844 That means that Github will finally be able to recognize Angelscript files as Angelscript instead of Actionscript!
  2. ARM questions

    Thanks for the help. I've switched to using 32 bit for now, especially since the platform I'm building for doesn't necessarily need a 64 bit build. The assembly file does compile and link on clang 32 bit, but I have yet to run it to see if it actually works.
  3. ARM questions

    So, I have a few questions about the ARM support in Angelscript. 1. Can I use as_callfunc_arm_gcc.S with clang, or is this specifically for gcc? 2. My compiler is complaining about casting a 64 bit void* to asDWORD in as_callfunc_arm.cpp, on lines like these, where secondObject is a void*. Can I ignore this as just a warning instead, or is that unsafe? paramBuffer[dpos++] = (asDWORD)secondObject; Thanks!
  4. Global Operator

    Wait, how does your first snippet work as a global Angelscript function? You're not specifying the type for the right hand side. Did you actually mean the use RegisterObjectMethod for that? I'm a bit confused at what your exact problem is now, but it looks like you have both set up while your scripts are actually only using 1 of those definitions (the RegisterObjectMethod one).
  5. Global Operator

    You might be able to point to the global function directly using asCALL_CDECL_OBJFIRST or asCALL_CDECL_OBJLAST actually, if you don't want to use a wrapper function.
  6. Global Operator

    I'm not sure why the operator needs to be a global? You use opMul as a method function and opMul_r as the reverse (a * b and b * a). For example: Obj opMul(const Obj &in rightHandSide) Obj opMul_r(const Obj &in leftHandSide) In the first, the object itself is the left hand side, and on the second it's the right hand side.
  7. Hey all! Thought I'd make a thread here about the tool I've been working on for the last few days: asdbg. It's a remote debugger (as in it uses 127.0.0.1 for IPC for the moment) with a visual code view. It's not much and probably not really usable for any serious project right now, but I'm hoping to some day get it there and use this for debugging our game (and future ones :)). It consists out of 2 parts, the host implementation code and the UI, so in theory it should be possible to implement the UI in something other than Windows (this is currently in C# WinForms, so it's Windows only for the time being). Feedback is always welcome!
  8. Edit: Nevermind this post, this was already solved in the WIP version that we haven't applied yet. See this code: class Banana { Banana() { print("Banana ctor.."); } } class Foo { Foo() { Banana(); } void Banana() { print("Banana!"); } } class Bar : Foo { Bar() { super(); } void Banana() override { /* INFO : Compiling void Bar::Banana() ERR : Identifier 'Banana' is not a data type in namespace 'Foo' or parent ERR : A cast operator has one argument ERR : Identifier 'Banana' is not a data type in namespace 'Foo' or parent */ Foo::Banana(); } } The errors are on Foo::Banana(). Changing the name of Foo::Banana and Bar::Banana do something else is the workaround for this. I feel like I've reported a similar issue in the past which was fixed, but not sure where that thread is now. This is on the latest 2.31.2 version. (I haven't tried the latest WIP yet.) Also, isn't the call to Banana() in the Foo ctor abiguous between Foo::Banana and Banana's ctor? Edit: Actually, it seems like this exact issue was the one I reported earlier, and was fixed: Perhaps this wasn't in 2.31.2 yet, and I'm just pointlessly double-reporting this.. I'm going to try the WIP verison, apologies!
  9. It would be nice to get some more info in a null ref exception message. For example, take this code: m_grid.m_netricsa.m_wPerkInfo.m_visible = false; If we got a null ref exception here and all m_* members are handles, how do we know which one is null? Could Angelscript say something like "m_wPerkInfo is null"? Also, when we're on the topic of null references, what about the null conditional operator "?." ? Would that be something that could be implemented?
  10. Question about garbage collect

    We have most of our memory issues fixed now. Thanks, this post helped! Also, related to this; it would be nice if messages like these: [WRN] [16:51:14] (0, 0) : INFO : The builtin type in previous message is named 'array' Could show up with their type instead, for example: [WRN] [16:51:14] (0, 0) : INFO : The builtin type in previous message is named 'array' I've modified as_module.cpp to achieve this myself for testing purposes: asCString templateInstanceName = ot->GetName(); asUINT numSubTypes = ot->templateSubTypes.GetLength(); if (numSubTypes > 0) { templateInstanceName += "<"; for (asUINT i = 0; i < numSubTypes; i++) { asCDataType &dt = ot->templateSubTypes[i]; templateInstanceName += dt.GetTypeInfo()->GetName(); if (i < numSubTypes - 1) templateInstanceName += ", "; } templateInstanceName += ">"; } msg.Format(TXT_PREV_TYPE_IS_NAMED_s, templateInstanceName.AddressOf()); engine->WriteMessage("", 0, 0, asMSGTYPE_INFORMATION, msg.AddressOf());
  11. That's great! Thanks for letting me know :)
  12. When we shut down our engine with this:   m_context->Release(); m_engine->GarbageCollect(); m_engine->ShutDownAndRelease();I get a whole lot of these kind of messages:   [WRN] [11:20:48] (0, 0) : ERR : Object {7962}. GC cannot destroy an object of type 'array' as it can't see all references. Current ref count is 1. [WRN] [11:20:48] (0, 0) : ERR : Object {7964}. GC cannot destroy an object of type 'array' as it can't see all references. Current ref count is 1. [WRN] [11:20:48] (0, 0) : ERR : Object {7963}. GC cannot destroy an object of type 'SpriteWidget' as it can't see all references. Current ref count is -1. [WRN] [11:20:48] (0, 0) : ERR : Object {7965}. GC cannot destroy an object of type 'array' as it can't see all references. Current ref count is 1. [WRN] [11:20:48] (0, 0) : ERR : Object {7966}. GC cannot destroy an object of type 'RectWidget' as it can't see all references. Current ref count is -1. [WRN] [11:20:48] (0, 0) : ERR : Object {7967}. GC cannot destroy an object of type 'array' as it can't see all references. Current ref count is 1. [WRN] [11:20:48] (0, 0) : ERR : Object {7968}. GC cannot destroy an object of type 'array' as it can't see all references. Current ref count is 1.What do they mean exactly? I'm a little confused at what "ref count is -1" means, as well as "ref count is 1"; where is it referenced? Is this a reference added by the program code when constructing these objects? Why does shutting down the engine not just get rid of everything?
  13. Syntax suggestion for if statements

    Ah, right, I knew it was more like for() and I think I've seen it in several languages. That C++17 syntax is indeed a lot nicer.
  14. This code snippet currently doesn't work, but would be very helpful syntax, which I believe is valid in a lot of other languages. Thoughts? if ((auto wText = cast<TextWidget>(w)) !is null) wText.SetColor(col); else if ((auto wButton = cast<ButtonWidget>(w)) !is null) wButton.SetColor(col);
  15. The following code: class Foo { private int _bar; int bar { get { return _bar; } set { _bar = value; } } } void Main() { Foo x, y; // You can't do this x.bar = y.bar = 10; // You have to do this instead: x.bar = 10; y.bar = 10; } Complains that "No matching signatures to 'Foo::set_bar(void)'". Instead, you have to set them individually. If I do this: int get_bar() { return _bar; } int set_var(int v) { _bar = v; return _bar; } It says "The property has no set accessor". Not sure if this is a bug or a missing feature though.