| 959 | } |
| 960 | |
| 961 | LUALIB_API int xlua_pack_float4(void *p, int offset, float f1, float f2, float f3, float f4) { |
| 962 | CSharpStruct *css = (CSharpStruct *)p; |
| 963 | if (css->fake_id != -1 || css->len < offset + sizeof(float) * 4) { |
| 964 | return 0; |
| 965 | } else { |
| 966 | float *pos = (float *)(&(css->data[0]) + offset); |
| 967 | pos[0] = f1; |
| 968 | pos[1] = f2; |
| 969 | pos[2] = f3; |
| 970 | pos[3] = f4; |
| 971 | return 1; |
| 972 | } |
| 973 | } |
| 974 | |
| 975 | LUALIB_API int xlua_unpack_float4(void *p, int offset, float *f1, float *f2, float *f3, float *f4) { |
| 976 | CSharpStruct *css = (CSharpStruct *)p; |
nothing calls this directly
no outgoing calls
no test coverage detected