void paging_touch_weapon( int weapon_type ) { // Page in the robot's weapons. if ( (weapon_type < 0) || (weapon_type > N_weapon_types) ) return; if ( Weapon_info[weapon_type].picture.index ) { PIGGY_PAGE_IN( Weapon_info[weapon_type].picture ); } if ( Weapon_info[weapon_type].flash_vclip > -1 ) paging_touch_vclip(&Vclip[Weapon_info[weapon_type].flash_vclip]); if ( Weapon_info[weapon_type].wall_hit_vclip > -1 ) paging_touch_vclip(&Vclip[Weapon_info[weapon_type].wall_hit_vclip]); if ( Weapon_info[weapon_type].damage_radius ) { // Robot_hit_vclips are actually badass_vclips if ( Weapon_info[weapon_type].robot_hit_vclip > -1 ) paging_touch_vclip(&Vclip[Weapon_info[weapon_type].robot_hit_vclip]); } switch( Weapon_info[weapon_type].render_type ) { case WEAPON_RENDER_VCLIP: if ( Weapon_info[weapon_type].weapon_vclip > -1 ) paging_touch_vclip( &Vclip[Weapon_info[weapon_type].weapon_vclip] ); break; case WEAPON_RENDER_NONE: break; case WEAPON_RENDER_POLYMODEL: paging_touch_model( Weapon_info[weapon_type].model_num ); break; case WEAPON_RENDER_BLOB: PIGGY_PAGE_IN( Weapon_info[weapon_type].bitmap ); break; } }
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; } }
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++; } } } }
void paging_touch_object_effects( int tmap_num ) { int i; for (i=0;i<Num_effects;i++) { if ( Effects[i].changing_object_texture == tmap_num ) { paging_touch_vclip( &Effects[i].vc ); } } }
static void paging_touch_object_effects( int tmap_num ) { range_for (auto &i, partial_const_range(Effects, Num_effects)) { if ( i.changing_object_texture == tmap_num ) { paging_touch_vclip(i.vc); break; } } }
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]); }
static void paging_touch_wall_effects( int tmap_num ) { range_for (auto &i, partial_const_range(Effects, Num_effects)) { if ( i.changing_wall_texture == tmap_num ) { paging_touch_vclip(i.vc); if (i.dest_bm_num > -1) PIGGY_PAGE_IN( Textures[i.dest_bm_num] ); //use this bitmap when monitor destroyed if ( i.dest_vclip > -1 ) paging_touch_vclip(Vclip[i.dest_vclip]); //what vclip to play when exploding if ( i.dest_eclip > -1 ) paging_touch_vclip(Effects[i.dest_eclip].vc); //what eclip to play when exploding if ( i.crit_clip > -1 ) paging_touch_vclip(Effects[i.crit_clip].vc); //what eclip to play when mine critical break; } } }
void paging_touch_wall_effects( int tmap_num ) { int i; for (i=0;i<Num_effects;i++) { if ( Effects[i].changing_wall_texture == tmap_num ) { paging_touch_vclip( &Effects[i].vc ); if (Effects[i].dest_bm_num > -1) PIGGY_PAGE_IN( Textures[Effects[i].dest_bm_num] ); //use this bitmap when monitor destroyed if ( Effects[i].dest_vclip > -1 ) paging_touch_vclip( &Vclip[Effects[i].dest_vclip] ); //what vclip to play when exploding if ( Effects[i].dest_eclip > -1 ) paging_touch_vclip( &Effects[Effects[i].dest_eclip].vc ); //what eclip to play when exploding if ( Effects[i].crit_clip > -1 ) paging_touch_vclip( &Effects[Effects[i].crit_clip].vc ); //what eclip to play when mine critical } } }
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] ); } }
static void paging_touch_weapon(const weapon_info &weapon) { // Page in the robot's weapons. if(weapon.picture.index) { PIGGY_PAGE_IN(weapon.picture); } if (weapon.flash_vclip > -1) paging_touch_vclip(Vclip[weapon.flash_vclip]); if (weapon.wall_hit_vclip > -1) paging_touch_vclip(Vclip[weapon.wall_hit_vclip]); if (weapon.damage_radius) { // Robot_hit_vclips are actually badass_vclips if (weapon.robot_hit_vclip > -1) paging_touch_vclip(Vclip[weapon.robot_hit_vclip]); } switch(weapon.render_type) { case WEAPON_RENDER_VCLIP: if (weapon.weapon_vclip > -1) paging_touch_vclip(Vclip[weapon.weapon_vclip]); break; case WEAPON_RENDER_NONE: break; case WEAPON_RENDER_POLYMODEL: paging_touch_model(weapon.model_num); break; case WEAPON_RENDER_BLOB: PIGGY_PAGE_IN(weapon.bitmap); break; } }