| 2512 | } |
| 2513 | |
| 2514 | void Map::ProcessWind( const MapData::Procedure::ActionCommand& command, bool activate ) |
| 2515 | { |
| 2516 | PC_ASSERT( command.id == MapData::Procedure::ActionCommandId::Wind ); |
| 2517 | |
| 2518 | const unsigned int x0= static_cast<unsigned int>( command.args[0] ); |
| 2519 | const unsigned int y0= static_cast<unsigned int>( command.args[1] ); |
| 2520 | const unsigned int x1= static_cast<unsigned int>( command.args[2] ); |
| 2521 | const unsigned int y1= static_cast<unsigned int>( command.args[3] ); |
| 2522 | const int dir_x= static_cast<int>( command.args[4] ); |
| 2523 | const int dir_y= static_cast<int>( command.args[5] ); |
| 2524 | |
| 2525 | for( unsigned int y= y0; y <= y1 && y < MapData::c_map_size; y++ ) |
| 2526 | for( unsigned int x= x0; x <= x1 && x < MapData::c_map_size; x++ ) |
| 2527 | { |
| 2528 | char* const cell= wind_field_[ x + y * MapData::c_map_size ]; |
| 2529 | if( activate ) |
| 2530 | { |
| 2531 | cell[0]= dir_x; |
| 2532 | cell[1]= dir_y; |
| 2533 | } |
| 2534 | else |
| 2535 | cell[0]= cell[1]= 0; |
| 2536 | } |
| 2537 | } |
| 2538 | |
| 2539 | void Map::ProcessDeathZone( const MapData::Procedure::ActionCommand& command, const bool activate ) |
| 2540 | { |
nothing calls this directly
no outgoing calls
no test coverage detected