MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / setInFrame

Method setInFrame

src/hx/cppia/CppiaVars.cpp:394–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392}
393
394void CppiaStackVar::setInFrame(unsigned char *inFrame,Dynamic inValue)
395{
396 unsigned char *ptr = inFrame + stackPos;
397 switch(storeType)
398 {
399 case fsByte:
400 *(int *)(ptr) = (unsigned char)inValue;
401 break;
402 case fsBool:
403 *(int *)(ptr) = (bool)inValue;
404 break;
405 case fsInt:
406 *(int *)(ptr) = inValue;
407 break;
408 case fsFloat:
409 SetFloatAligned(ptr,inValue);
410 break;
411 case fsString:
412 *(String *)(ptr) = inValue;
413 break;
414 case fsObject:
415 *(hx::Object **)(ptr) = inValue.mPtr;
416 break;
417 case fsUnknown:
418 break;
419 }
420}
421
422void CppiaStackVar::set(CppiaCtx *inCtx,Dynamic inValue)
423{

Callers 1

setScriptableValueMethod · 0.80

Calls 1

SetFloatAlignedFunction · 0.85

Tested by

no test coverage detected