diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/critter.cpp | 2 | ||||
-rw-r--r-- | src/object.hpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/critter.cpp b/src/critter.cpp index abb80865..72c06133 100644 --- a/src/critter.cpp +++ b/src/critter.cpp @@ -157,7 +157,7 @@ void critter::update_movement(size_t i, Ns dt, rotation new_r) fm_assert(is_dynamic()); const auto hz = atlas->info().fps; - const auto nframes = alloc_frame_time<uint16_t>(dt, delta, hz, speed); + const auto nframes = alloc_frame_time<uint32_t>(dt, delta, hz, speed); if (nframes == 0) return; diff --git a/src/object.hpp b/src/object.hpp index b77b0f42..4ada39d4 100644 --- a/src/object.hpp +++ b/src/object.hpp @@ -21,7 +21,8 @@ struct object_proto std::shared_ptr<anim_atlas> atlas; Vector2b offset, bbox_offset; Vector2ub bbox_size = Vector2ub(tile_size_xy); - uint16_t delta = 0, frame = 0; + uint32_t delta = 0; + uint16_t frame = 0; object_type type : 3 = object_type::none; rotation r : rotation_BITS = rotation::N; pass_mode pass : pass_mode_BITS = pass_mode::see_through; // todo move to struct scenery, add inherit bit @@ -47,7 +48,7 @@ struct object const global_coords coord; const Vector2b offset, bbox_offset; const Vector2ub bbox_size; - uint16_t delta = 0; // todo! switch to Vector2ui due to `allocate_frame_time' + uint32_t delta = 0; uint16_t frame = 0; const rotation r = rotation::N; // todo remove bitfield? const pass_mode pass = pass_mode::see_through; |