Jump to content

  • Log In with Google      Sign In   
  • Create Account


Tzarls

Member Since 13 Mar 2012
Offline Last Active Yesterday, 09:50 PM
-----

#5036728 What's everyone doing with Angelscript!

Posted by Tzarls on 26 February 2013 - 09:48 AM

I´m working on a graphicall programming system. Here´s a couple of videos showing what I´ve got so far:

 

 

The las video shows AS running on a Raspberry Pi, an ARM/Linux based system.




#5001107 Angelscript on Raspberry Pi

Posted by Tzarls on 14 November 2012 - 10:40 PM

Yes, we found that info the hard way...disassembly after disassembly after disassembly,,, Posted Image
Right now I have an asm function that is passed 4 args, the fourth being the pointer to the float array args of the actual system function. I need to know how to store (in asm) the values of the array in the different float registers ("s" registers).

The problem is... I know about 0.000001e-19 % of ASM, so I´m kind of doing this "using the force"...Posted Image


#4999505 Angelscript on Raspberry Pi

Posted by Tzarls on 09 November 2012 - 07:31 PM

Hi. I´ve been trying to build Angelscript on a Raspberry Pi computer (ARM processor). I made some modifications to the makefile and I´ve got mixed results.

First, after the

...
else ifeq($(TARGERPLATFORM), android)
	OBJ += $(OBJDIR)/as_callfunc_arm_gcc.o

I added:

else
	OBJ += $(OBJDIR)/as_callfunc_arm_gcc.o


Since the RPi is ARM based, and since I´m using gcc, this looked like the right thing to do.
I also had to add -DAS_NO_THREADS to avoid getting some "unreferences".

The Tutorial and Game examples build fine with this setup, but in the tutorial project I´ve found some problems. When running it, the program outputs this:

---
Received: 1000, 1000
System has been running for 1000 seconds.
---
The script function returned: 8.53973

So as you can see, the received values are wrong. (Interestingly enough, the value returned at the end is correct).

I have the same problem with an application I made. Everything seems to be working fine as long as I use ints or string within my scripts, but as soon as I use floats or doubles the values get corrupted. (I haven´t tested the game project enough, BTW).

If I build the library with -DAS_MAX_PORTABILITY then the tutorial project build ok and works as expected:

---
Received: 3.14159, 2.71828
System has been running for 3.89004e+06 seconds.
---
The script function returned: 8.53973



Any ideas on what could be the problem or what to look for in order to find a solution?

Thanks!


#4945461 Segmentation fault - void asCScriptEngine::CallObjectMethod(...)

Posted by Tzarls on 01 June 2012 - 06:49 PM

Apparently this isn´t my fault :D

Here´s a minimal code that exhibits the same behaviour:

main.h :

#ifndef _MAIN_
#define _MAIN_
#include <cstdio>
#include <angelscript.h>
class msgClass
{
    public:
    /*virtual*/ void MessageCallback(const asSMessageInfo *msg)  // uncomment "virtual" and the app fails
    {
const char *type = "ERR ";
if( msg->type == asMSGTYPE_WARNING )
  type = "WARN";
else if( msg->type == asMSGTYPE_INFORMATION )
  type = "INFO";
printf("%s (%d, %d) : %s : %s\n", msg->section, msg->row, msg->col, type, msg->message);
}
};
#endif

main.cpp :

#include "main.h"
int main (int argc, char ** argv)
{
    msgClass *msg = new msgClass;
// Create the script engine
asIScriptEngine *engine = asCreateScriptEngine(ANGELSCRIPT_VERSION);
if( engine == 0 )
{
  printf("Failed to create script engine.\n");
  return -1;
}
engine->SetMessageCallback( asMETHOD(msgClass,MessageCallback),msg,asCALL_THISCALL );
engine->WriteMessage("My Section", 11, 38, asMSGTYPE_INFORMATION, "Testing Message Callback" );
printf ("Done!");
return 0;
}



PARTNERS