, 내가 가지고있는 다음과 같은 C++ 구조는 ...JNA : 어떻게 사용자 정의 비트 크기의 필드가있는 구조를 정의 할 수 있습니까? 예를 들어
struct dleaf_t
{
int contents; // OR of all brushes (not needed?)
short cluster; // cluster this leaf is in
short area : 9; // area this leaf is in
short flags : 7; // flags
short mins[ 3 ]; // for frustum culling
short maxs[ 3 ];
unsigned short firstleafface; // index into leaffaces
unsigned short numleaffaces;
unsigned short firstleafbrush; // index into leafbrushes
unsigned short numleafbrushes;
short leafWaterDataID; // -1 for not in water
//!!! NOTE: for maps of version 19 or lower uncomment this block
/*
CompressedLightCube ambientLighting; // Precaculated light info for entities.
short padding; // padding to 4-byte boundary
*/
};
은 일반적으로 내가 JNA와 자바에서 쉽게 구조를 나타낼 수 있지만,이 구조는 내가 틀리지 않는 경우 (데이터 유형에 대한 사용자 지정 비트 양을 사용). 예컨대
는 area
오히려 평소처럼 16 비트보다, 9 비트 short
이다. flags
은 비트 ... 등등입니다.
맞춤 비트 크기의 데이터 유형으로 JNA 구조를 어떻게 정의 할 수 있습니까?