Jump to content

  • Log In with Google      Sign In   
  • Create Account

shabtronic

Member Since 07 Dec 2011
Offline Last Active Dec 02 2013 10:00 PM

Topics I've Started

Help BCB 6.00

22 November 2013 - 10:03 AM

Hi All

I've got a problem with the Latest version of angelscript and borlands BCB 6.00 - I got it to compile (there were a few compile issues - but very easily fixed). It all worked fine - Building angelscript code exectuing e.t.c. - The problem happens when using the STDSTRING extension,

using strings in script works fine and it compiles and runs - the problem is that my EXE hangs when exiting back to windows - I've tried to track down the issue - but no joy yet - anybody got any similar issues?

 

I've tried the following scenarios:

 

RegisterScriptArray(Angel,true);
RegisterStdString(Angel);
 
Exe hangs when exiting back to window - even if my script code has no string usage
 
RegisterScriptArray(Angel,true);
//RegisterStdString(Angel);
 
Exe is fine and exits back to windows properly
 
//RegisterScriptArray(Angel,true);
RegisterStdString(Angel);

 

Exe hangs when exiting back to window - even if my script code has no string usage
 
I'm thinking it's some kind of STL Issue - but who knows?
 
 
here's the call stack from the hang
********************************
005599F2 _STL::__node_alloc<1, 0>::_M_deallocate
00532B94 _STL::__node_alloc<1, 0>::_M_deallocate
004ABC13 TForm2::~TForm2
004AD53B TForm2::~TForm2
00534D54 _STL::__node_alloc<1, 0>::_M_deallocate
0053409C _STL::__node_alloc<1, 0>::_M_deallocate
00533FFF _STL::__node_alloc<1, 0>::_M_deallocate
005196C3 __init_exit_proc
00519712 __cleanup
005189D4 _exit
005198E8 __startup
*******************************

many thanks

 

Shabby

 

p.s. anybody else trying to uses BCB 6.00 you have to change any of the macros that have a ; after them, bcb wont compile class with ; and no definitions.

 

from:

protected:
DECLARECRITICALSECTION(cs);

to:

protected:
DECLARECRITICALSECTION(cs)

 

and some of the object pointers have to be explicitly cast before the compile will swallow them (forget which ones - easy fix tho).


noob help with global class functions

04 May 2013 - 11:38 AM

Hi All

 

I've just discovered angelscript and totally love it - having used lua,squirrel e.t.c. it's just awesome - everything I've need in a script lang - typed fast and easy to convert to native code.

 

I've currently got a problem with my vec3 class - I'm using global functions instead of member functions so I can directly match GLSL - this is so I can easily convert code from native c++ to GLSL and to script if needed.

 

I'm trying to register a global func:

 

 

r = gScriptEngine->RegisterGlobalFunction("vec3 normalize( vec3 &v1)", asFUNCTION(normalize), asCALL_CDECL);
 
 
but I get error -10 and
"Failed in call to function 'RegisterGlobalFunction' with 'vec3 normalize( vec3 &v1)' (Code: -10)"
 
and I just can't figure out the issue, apologies in advance if it's silly problem - I've looked at all the various vector3 classes out there and search the net for answers - but no joy yet :(
 
thanks
 
Shabby

Sequencing Code

07 December 2011 - 06:58 AM

HI I'm trying to come up with a way to sequence code easily and without using a million classes.

I want to be able to execute code x frames in the future for y frame duration - something like this:

if (HitSomething)
{
Seq(10,20,PlaySound,"CrashHit.wav"); // Call fun Playsound("CrashHit.wav") in 10 frames time for 20 frames
Seq(10,50,StarFlare,10,20,1.5,4); // Call func StarFlare(10,20,1.5,5) in 10 frames time for 50 frames
}

This is great because it can handle any function, and the code is localised. I can do this - but it's alot of work to get the Variadic stuff working across different platform - requires some hardcore asm to calc the Param stack Size and setup the epilog code e.t.c.

wondering if there are any neat tricks to get something similar.

PARTNERS