Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Zervoxe

Member Since 28 Aug 2009
Offline Last Active Today, 09:57 AM

Topics I've Started

Version changes on 16bit string structures?

14 August 2014 - 02:58 AM

This is a change I've noticed in versions

2.27.0 WIP

2.29.1 WIP

 

The difference I am having in these two is that in 

2.27.0 WIP 

I can register a 16bit char string class and it works perfectly.

in

2.29.1 WIP

registering the same string factory, I am getting odd results of the strings. Lots of asian characters.

 

Log(CString &)

Log("Testing Script");

gives

2.27.0 WIP = Testing Script

2.29.1 WIP= Testing Script눀Ϣ⳼

 

 

Log("Testing Scrip");

gives

2.27.0 WIP = Testing Scrip

2.29.1 WIP= Testing Scrip

 

 
anyone got tips on how to solve this? Kinda hard doing 8bit chars replacement when all of my application uses 16bit strings.

Angelscript stdstring

09 February 2014 - 11:32 PM

Angelscript in the latest revisions seems to have snuck in a memory leak into stdstring implementation. Atleast Esenthel Engine's memory leak detector seems to find that somewhere inside it is when using string inside angelscript.


Multiple object arguments problem

09 February 2014 - 11:07 PM

I am currently getting some issues with compiling my script

AngelScript:

int SpellFire(BaseEntity& spell, BaseEntity& cast, BaseEntity& trg){
return 0;
}
C++ call and BaseEntity registry
 
Register
void RegisterBaseEntityAngel(asIScriptEngine *engine){
// Registering the class method
int r = engine->RegisterObjectType("BaseEntity", sizeof(BaseEntity), asOBJ_REF); DYNAMIC_ASSERT(r >= 0, "Error in return result");
r = engine->RegisterObjectBehaviour("BaseEntity", asBEHAVE_ADDREF, "void f()", asMETHOD(BaseEntity, AddRef), asCALL_THISCALL); DYNAMIC_ASSERT(r >= 0, "Error in return result");
r = engine->RegisterObjectBehaviour("BaseEntity", asBEHAVE_RELEASE, "void f()", asMETHOD(BaseEntity, Release), asCALL_THISCALL); DYNAMIC_ASSERT(r >= 0, "Error in return result");
Init
ctx = scriptMgr.GetEngine()->CreateContext();
asIScriptModule *mod = scriptMgr.GetEngine()->GetModule("SpellFuncs");
Function = mod->GetFunctionByDecl(Str8(Stat("Script")->string));
update
ctx->Prepare(Function); 
ctx->SetArgObject(0, &T);// Set the function arguments 
ctx->SetArgObject(1, cast);// Set the function arguments 
ctx->SetArgObject(2, trg);// Set the function arguments 
scriptMgr.ExecuteCall(ctx); 
int dmg = ctx->GetReturnDWord(); 
ctx->Unprepare();

Log complaints

Data/Script/Spells/Fire.as (1, 46) : ERROR:  : Expected ')' or ','Please correct the errors in the script and try again.  (0, 0) : ERROR:  : Failed in call to function 'Prepare' with 'null' (Code: -6)  (0, 0) : ERROR:  : Failed in call to function 'Execute' (Code: -4)

Anyone care to explain what I am doing wrong?

I've tried removing and changing @ to & and without sign

 

It works if I am using only one BaseEntity.


Rawinput x64 bit problem

26 August 2013 - 06:17 AM

My problem is when I move the mouse in x64 it only moves to right, it ignores up,left and down, it also does it extremely slowly(it only registers a quarter of the mouse delta move) compared to Win32. I expect this is a result of long being 64bit in Win64, and how would I deal with this change?

 

 

WM_INPUT in main.cpp

UInt nSize = 40;
BYTE m_Buffer[40];
GetRawInputData( (HRAWINPUT)lparam, RID_INPUT, (LPVOID)m_Buffer, &nSize, sizeof(RAWINPUTHEADER));
//ASSERT( nSize <= BUFFER_SIZE );
RAWINPUT* pRaw = (RAWINPUT*) m_Buffer;

// Read keyboard and mouse data
if( pRaw->header.dwType == RIM_TYPEKEYBOARD ){Kb.GatherRawInput(&pRaw->data.keyboard );}
if( pRaw->header.dwType == RIM_TYPEMOUSE ){Ms.GatherRawInput( &pRaw->data.mouse);}

Inside MsGatherRawInput

delta is a int x,y structure.

delta.set((int)pRM->lLastX,(int)pRM->lLastY);

void *ptr problem

26 July 2013 - 09:59 AM

So I hit another problem which I couldn't find in the documentation.

I was wondering how would I expose something like

 

void Object::init(void* agent)

from C++ to Angelscript?


PARTNERS