예제 #1
0
// register object type for vapor trail ---------------------------------------
//
PRIVATE
void VaporTrailRegisterCustomType()
{
	custom_type_info_s info;
	memset( &info, 0, sizeof( info ) );

	// always try to allocate template
	vapor_type_template = (VaporTrail *) ALLOCMEM( sizeof( VaporTrail ) );
	if ( vapor_type_template != NULL ) {
		memset( vapor_type_template, 0, sizeof( VaporTrail ) );
		VaporTrailInitDefaults( vapor_type_template );
	}

	info.type_name			= "vaportrail";
	info.type_id			= 0x00000000;
	info.type_size			= sizeof( VaporTrail );
	info.type_template		= vapor_type_template;
	info.type_flags			= CUSTOM_TYPE_DEFAULT;
	info.callback_init		= VaporTrailInitType;
	info.callback_instant	= VaporTrailInstantiate;
	info.callback_destroy	= VaporTrailDestroy;
	info.callback_animate	= VaporTrailAnimate;
	info.callback_collide	= NULL;
	info.callback_notify	= VaporTrailNotify;
	info.callback_persist   = NULL;

	vapor_type_id = OBJ_RegisterCustomType( &info );
	CON_RegisterCustomType( info.type_id, VaporTrail_PropList );
}
예제 #2
0
// register object type for stargate ------------------------------------------
//
PRIVATE
void StargateRegisterCustomType()
{
	custom_type_info_s info;
	memset( &info, 0, sizeof( info ) );

	info.type_name			= "stargate";
	info.type_id			= 0x00000000;
	info.type_size			= sizeof( Stargate );
	info.type_template		= NULL;
	info.type_flags			= CUSTOM_TYPE_DEFAULT;
	info.callback_init		= StargateInitType;
	info.callback_instant	= StargateInstantiate;
	info.callback_destroy	= StargateDestroy;
	info.callback_animate	= StargateAnimate;
	info.callback_collide	= StargateCollide;
	info.callback_persist   = StargatePersistToStream;

	OBJ_RegisterCustomType( &info );
	CON_RegisterCustomType( info.type_id, Stargate_PropList );
}