Not a very good joke I grant you
For clarity, I refer you to a proper description of 0 and 1 in respect of the TRANSPARENCY flag in the FPE file system:
http://en.wikipedia.org/wiki/Boolean
The layman only need know these two states to control whether transparency is applied to the entity, however in order to provide a complete break-down of the magic behind the curtain, here is the DBA code that picks up the value:
tryfield$="transparency"
if field$=tryfield$ then entityprofile(entid).transparency=value1
And the code which will use that value:
rem Set any entity transparency
if entobj>0
set object transparency entobj,entityprofile(entid).transparency
endif
And for the avoidance of doubt, here is the C++ code which is called as a result:
DARKSDK_DLL void SetTransparency ( int iID, int iTransparency )
{
// Transparency Modes
// 0 - first-phase no alpha
// 1 - first-phase with alpha masking
// 2 and 3 - second-phase which overlaps solid geometry
// 4 - alpha test (only render beyond 0x000000CF alpha values)
// 5 - water line object (seperates depth sort automatically)
// 6 - combination of 3 and 4 (second phase render with alpha blend AND alpha test, used for fading LOD leaves)
// 7 - very early draw phase no alpha
// check the object exists
if ( !ConfirmObjectInstance ( iID ) )
return;
// new transparency mode
SDK_BOOL bTransparency=TRUE;
if ( iTransparency==0 ) bTransparency=FALSE;
if ( iTransparency==7 ) bTransparency=FALSE;
// apply setting to all meshes
sObject* pObject = g_ObjectList [ iID ];
for ( int iMesh = 0; iMesh < pObject->iMeshCount; iMesh++ )
{
SetTransparency ( pObject->ppMeshList [ iMesh ], bTransparency==TRUE );
SetAlphaTest ( pObject->ppMeshList [ iMesh ], 0x0 );
if ( iTransparency==4 || iTransparency==6 )
{
SetAlphaTest ( pObject->ppMeshList [ iMesh ], 0x000000CF );
}
}
// apply transparency as object overlay
SetObjectTransparency ( pObject, iTransparency );
}
Which of course leads us down into the core object manager of the engine, which shows this:
DARKSDK_DLL void SetObjectTransparency ( sObject* pObject, int iTransparency )
{
// promote to overlay layer (or not)
if ( iTransparency==2 || iTransparency==3 || iTransparency==5 || iTransparency==6 )
pObject->bTransparentObject = true;
else
pObject->bTransparentObject = false;
// new feature - create a water line (for two layers of depth sorted objs above and below line)
if ( iTransparency==5 )
pObject->bTransparencyWaterLine = true;
else
pObject->bTransparencyWaterLine = false;
// transparency mode 7 sets an object to very early draw phase
if ( iTransparency==7 )
pObject->bVeryEarlyObject = true;
else
pObject->bVeryEarlyObject = false;
// overlay flag handling
UpdateOverlayFlag ( pObject );
}
I appreciate the flag names are not entirely self-explanatory, so I invite you to explore the full DBP Engine Source Code at this location:
https://code.google.com/p/darkbasicpro/
If there is any more information you require on the functionality of the TRANSPARENCY field in the FPE file, please do not hesitate to ask. I am here to serve (when not coding)
PC SPECS: Windows 7 Ultimate 64-bit, Intel Core i7 920 (PASSMARK:5008), NVIDIA Geforce 9600 GT GPU (PASSMARK:752) , 6GB RAM