Пример #1
0
Файл: paging.c Проект: btb/d2x
void paging_touch_robot_maker( segment * segp )
{
	segment2 *seg2p = s2s2(segp);

	if ( seg2p->special == SEGMENT_IS_ROBOTMAKER )	{
		paging_touch_vclip(&Vclip[VCLIP_MORPHING_ROBOT]);
		{
			int	i;
			uint	flags;
			int	robot_index;

			for (i=0;i<2;i++) {
				robot_index = i*32;
				flags = RobotCenters[seg2p->matcen_num].robot_flags[i];
				while (flags) {
					if (flags & 1)	{
						// Page in robot_index
						paging_touch_robot( robot_index );
					}
					flags >>= 1;
					robot_index++;
				}
			}
		}
	}
Пример #2
0
void paging_touch_object( object * obj )
{
	int v;

	switch (obj->render_type) {

		case RT_NONE:	break;		//doesn't render, like the player

		case RT_POLYOBJ:
			if ( obj->rtype.pobj_info.tmap_override != -1 )
				PIGGY_PAGE_IN( Textures[obj->rtype.pobj_info.tmap_override] );
			else
				paging_touch_model(obj->rtype.pobj_info.model_num);
			break;

		case RT_POWERUP: 
			if ( obj->rtype.vclip_info.vclip_num > -1 ) {
		//@@	#ifdef WINDOWS
		//@@		paging_touch_vclip_w(&Vclip[obj->rtype.vclip_info.vclip_num]);
		//@@	#else
				paging_touch_vclip(&Vclip[obj->rtype.vclip_info.vclip_num]);
		//@@	#endif
			}
			break;

		case RT_MORPH:	break;

		case RT_FIREBALL: break;

		case RT_WEAPON_VCLIP: break;

		case RT_HOSTAGE: 
			paging_touch_vclip(&Vclip[obj->rtype.vclip_info.vclip_num]);
			break;

		case RT_LASER: break;
 	}

	switch (obj->type) {	
	case OBJ_PLAYER:	
		v = get_explosion_vclip(obj, 0);
		if ( v > -1 )
			paging_touch_vclip(&Vclip[v]);
		break;
	case OBJ_ROBOT:
		paging_touch_robot( obj->id );
		break;
	case OBJ_CNTRLCEN:
		paging_touch_weapon( CONTROLCEN_WEAPON_NUM );
		if (Dead_modelnums[obj->rtype.pobj_info.model_num] != -1)	{
			paging_touch_model( Dead_modelnums[obj->rtype.pobj_info.model_num] );
		}
		break;
	}
}
Пример #3
0
static void paging_touch_robot(const robot_info &ri)
{
	// Page in robot_index
	paging_touch_model(ri.model_num);
	if (ri.exp1_vclip_num > -1)
		paging_touch_vclip(Vclip[ri.exp1_vclip_num]);
	if (ri.exp2_vclip_num > -1)
		paging_touch_vclip(Vclip[ri.exp2_vclip_num]);

	// Page in his weapons
	paging_touch_weapon(ri.weapon_type);

	// A super-boss can gate in robots...
	if (ri.boss_flag == BOSS_SUPER)
	{
		range_for (const auto i, super_boss_gate_type_list)
			paging_touch_robot(i);
		paging_touch_vclip(Vclip[VCLIP_MORPHING_ROBOT]);
	}
Пример #4
0
void paging_touch_robot( int robot_index )
{
	int i;

	// Page in robot_index
	paging_touch_model(Robot_info[robot_index].model_num);
	if ( Robot_info[robot_index].exp1_vclip_num>-1 )
		paging_touch_vclip(&Vclip[Robot_info[robot_index].exp1_vclip_num]);
	if ( Robot_info[robot_index].exp2_vclip_num>-1 )
		paging_touch_vclip(&Vclip[Robot_info[robot_index].exp2_vclip_num]);

	// Page in his weapons
	paging_touch_weapon( Robot_info[robot_index].weapon_type );

	// A super-boss can gate in robots...
	if ( Robot_info[robot_index].boss_flag==2 )	{
		for (i=0; i<13; i++ )
			paging_touch_robot(super_boss_gate_type_list[i]);

		paging_touch_vclip( &Vclip[VCLIP_MORPHING_ROBOT] );
	}
}