AngelScript 1.10.0 FINAL (2004/11/02)
I've added test cases for all conversions so this should never happen again.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Here's a fix that works:
case BC_dTOi: { int i = int(*(double*)(l_sp++)); *l_sp = i; } l_bc += BCS_dTOui; break; case BC_dTOui: { asUINT u = asDWORD(*(double*)(l_sp++)); *l_sp = u; } l_bc += BCS_dTOui; break; case BC_dTOf: { float f = float(*(double*)(l_sp++)); *(float*)l_sp = f; } l_bc += BCS_dTOf; break; case BC_iTOd: { double d = double(int(*l_sp--)); *(double*)l_sp = d; } l_bc += BCS_iTOd; break; case BC_uiTOd: { double d = double(*l_sp--); *(double*)l_sp = d; } l_bc += BCS_uiTOd; break; case BC_fTOd: { double d = double(*(float*)(l_sp--)); *(double*)l_sp = d; } l_bc += BCS_fTOd; break;
This teaches us that we can't rely on when the ++ and -- operators will be evaluated. If we need them to be exactly as we want them then the expressions must to be broken up.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
GetReturnValue
int GetStackData(asDWORD *data,int count);
oops?
At first I didn't see what you meant. I thought you were wondering about the parameters, but then I saw the difference in function names. [wink]
I'll have that fixed for the next release.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Integration into the MSVC++ debugger would be a completely different matter though. I don't know how to do this, or even if it's possible.
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
That is what i have implemented here, and i asked you if you want this to be integrated in the current AS or in the new AS2, the debug hook
in bc_Line step, there is a:
if(debug_hook)
status = debug_hook(linenumber, state, whatever, ....)
if(status == _Suspend)
jmp bc_Suspsend
so if the client application implements a function with the correct declaration ( scriptEngine->SetDebugHook(debug_hookFunc); ) it will recive callbacks every line of execution with the line number and all the parameters that it will need
in the client application:
uint debug_hookFunc(int linenumber, uint state, whatever, ....) {
........
application specific code
if(breakpointsMap.find(linenumber)) {
execution line is on some breakpoint, do what you need
........
application specific code
return state_Suspsend;
}
........
application specific code
return state_continue;
}
this way the debugger can be created very easy, externally and will not affect the as engine, because in release it will compiled without the bc_line opcode
Lioric