gel-world: Add 'reserve_Ids' procedure.

This commit is contained in:
Rod Kay
2024-01-09 17:03:42 +11:00
parent c06af0baf4
commit f0760d0870
2 changed files with 26 additions and 2 deletions

View File

@@ -1154,6 +1154,21 @@ is
-------
--- Ids
--
procedure reserve_Ids (Self : in out Item; Before : in long_Integer)
is
begin
Self.last_used_sprite_Id := sprite_Id (Before - 1);
Self.last_used_model_Id := graphics_model_Id (Before - 1);
Self.last_used_physics_model_Id := physics .model_Id (Before - 1);
end reserve_Ids;
----------- -----------
-- Testing -- Testing
-- --

View File

@@ -241,7 +241,6 @@ is
-------------------- --------------------
--- World Mirroring --- World Mirroring
-- --
@@ -269,6 +268,7 @@ is
function Sprites (Self : in out Item) return remote.World.sprite_model_Pairs; function Sprites (Self : in out Item) return remote.World.sprite_model_Pairs;
---------- ----------
--- Models --- Models
-- --
@@ -297,6 +297,15 @@ is
-------
--- Ids
--
procedure reserve_Ids (Self : in out Item; Before : in long_Integer);
------------------ ------------------
--- Testing/Debug --- Testing/Debug
-- --
@@ -427,7 +436,7 @@ private
-- Ids -- Ids
-- --
last_used_sprite_Id : gel.sprite_Id := 0; last_used_sprite_Id : gel.sprite_Id := 0;
last_used_model_Id : gel.graphics_model_Id := 0; last_used_model_Id : gel.graphics_model_Id := 0; --TODO: Rename to 'last_used_graphics_model_Id'.
last_used_physics_model_Id : physics .model_Id := 0; last_used_physics_model_Id : physics .model_Id := 0;
-- Free Sets -- Free Sets