File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,18 @@ impl WorldData for ParticleWorldState {
9999        else  { 
100100            return  Err ( eyre ! ( "chunk not loaded" ) ) ; 
101101        } ; 
102+         let  mut  chunk_iter = chunk. iter_mut ( ) ; 
102103        let  ( shift_x,  shift_y)  = self . get_shift :: < CHUNK_SIZE > ( cx,  cy) ; 
103-         for  ( ( j,  i) ,  p)  in  ( shift_x..shift_x + CHUNK_SIZE  as  isize ) 
104-             . flat_map ( |i| ( shift_y..shift_y + CHUNK_SIZE  as  isize ) . map ( move  |j| ( i,  j) ) ) 
105-             . zip ( chunk. iter_mut ( ) ) 
106-         { 
107-             * p = pixel_array. get_pixel ( i,  j) ; 
104+         for  j in  shift_y..shift_y + CHUNK_SIZE  as  isize  { 
105+             for  i in  shift_x..shift_x + CHUNK_SIZE  as  isize  { 
106+                 * chunk_iter. next ( ) . unwrap ( )  = pixel_array. get_pixel ( i,  j) ; 
107+             } 
108108        } 
109+ 
109110        Ok ( ( ) ) 
110111    } 
111112    unsafe  fn  decode_world ( & self ,  chunk :  NoitaWorldUpdate )  -> eyre:: Result < ( ) >  { 
113+         return  Ok ( ( ) ) ;  // TODO 
112114        let  chunk_coord = chunk. coord ; 
113115        let  ( cx,  cy)  = ( chunk_coord. 0  as  isize ,  chunk_coord. 1  as  isize ) ; 
114116        let  Some ( pixel_array)  = unsafe  {  self . world_ptr . as_mut ( )  } 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments