senc2d_side_range.h (1275B)
1 /* Copyright (C) 2018-2021, 2023, 2024 |Méso|Star> (contact@meso-star.com) 2 * 3 * This program is free software: you can redistribute it and/or modify 4 * it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 3 of the License, or 6 * (at your option) any later version. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 16 #ifndef SENC2D_SIDE_RANGE_H 17 #define SENC2D_SIDE_RANGE_H 18 19 #include "senc2d_internal_types.h" 20 21 #include <rsys/dynamic_array.h> 22 23 struct mem_allocator; 24 25 struct side_range { 26 side_id_t first, last; 27 }; 28 29 static FINLINE void 30 side_range_init(struct mem_allocator* alloc, struct side_range* data) 31 { 32 ASSERT(data); 33 (void)alloc; 34 data->first = SIDE_NULL__; 35 data->last = 0; 36 } 37 38 #define DARRAY_NAME side_range 39 #define DARRAY_DATA struct side_range 40 #define DARRAY_FUNCTOR_INIT side_range_init 41 #include <rsys/dynamic_array.h> 42 43 44 #endif /* SENC2D_SCENE_C_H */