Tidy.
This commit is contained in:
@@ -169,12 +169,12 @@ is
|
||||
Self.Dimensions.Width := min_Width;
|
||||
Self.Dimensions.Height := min_Height;
|
||||
|
||||
new_Line (3);
|
||||
put_Line ("openGL.Texture.set_Image ~ GLsizei (Self.Dimensions.Width) =>" & GLsizei (Self.Dimensions.Width) 'Image);
|
||||
put_Line (" ~ GLsizei (Self.Dimensions.Height) =>" & GLsizei (Self.Dimensions.Height)'Image);
|
||||
put_Line (" ~ the_Image =>");
|
||||
put_Line (the_Image'Image);
|
||||
new_Line (3);
|
||||
-- new_Line (3);
|
||||
-- put_Line ("openGL.Texture.set_Image ~ GLsizei (Self.Dimensions.Width) =>" & GLsizei (Self.Dimensions.Width) 'Image);
|
||||
-- put_Line (" ~ GLsizei (Self.Dimensions.Height) =>" & GLsizei (Self.Dimensions.Height)'Image);
|
||||
-- put_Line (" ~ the_Image =>");
|
||||
-- put_Line (the_Image'Image);
|
||||
-- new_Line (3);
|
||||
|
||||
Self.enable;
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ with
|
||||
|
||||
ada.unchecked_Conversion;
|
||||
|
||||
with ada.Text_IO; use ada.Text_IO;
|
||||
|
||||
|
||||
package body box2d_Physics.Space
|
||||
is
|
||||
use box2d_c.Binding,
|
||||
@@ -413,6 +416,7 @@ is
|
||||
end add;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
procedure rid (Self : in out Item; the_Object : in physics.Object.view)
|
||||
is
|
||||
@@ -422,6 +426,7 @@ is
|
||||
end rid;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
function cast_Ray (Self : access Item; From, To : in Vector_3) return physics.Space.ray_Collision
|
||||
is
|
||||
@@ -446,6 +451,7 @@ is
|
||||
end cast_Ray;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
procedure evolve (Self : in out Item; By : in Duration)
|
||||
is
|
||||
@@ -470,6 +476,7 @@ is
|
||||
end evolve;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
function Gravity (Self : in Item) return Vector_3
|
||||
is
|
||||
@@ -479,6 +486,7 @@ is
|
||||
end Gravity;
|
||||
|
||||
|
||||
|
||||
overriding
|
||||
procedure Gravity_is (Self : in out Item; Now : in Vector_3)
|
||||
is
|
||||
|
||||
@@ -102,11 +102,11 @@ is
|
||||
|
||||
use openGL;
|
||||
begin
|
||||
log ("gel.world.client.to_Sprite ~ the_Pair.graphics_Model_Id:" & the_Pair.graphics_Model_Id'Image);
|
||||
-- log ("gel.world.client.to_Sprite ~ the_Pair.graphics_Model_Id:" & the_Pair.graphics_Model_Id'Image);
|
||||
|
||||
the_graphics_Model := openGL .Model.view (the_graphics_Models.Element (the_Pair.graphics_Model_Id));
|
||||
|
||||
log ("gel.world.client.to_Sprite ~ the_Pair.physics_Model_Id:" & the_Pair.physics_Model_Id'Image);
|
||||
-- log ("gel.world.client.to_Sprite ~ the_Pair.physics_Model_Id:" & the_Pair.physics_Model_Id'Image);
|
||||
|
||||
the_physics_Model := physics.Model.view ( the_physics_Models.Element (the_Pair. physics_Model_Id));
|
||||
|
||||
@@ -158,7 +158,7 @@ is
|
||||
procedure respond (Self : in out create_new_Sprite; to_Event : in lace.Event.item'Class)
|
||||
is
|
||||
begin
|
||||
raise Program_Error with "KKK";
|
||||
raise Program_Error with "???";
|
||||
-- declare
|
||||
-- the_Event : constant gel.Events.new_sprite_Event := gel.Events.new_sprite_Event (to_Event);
|
||||
-- the_Sprite : constant gel.Sprite.view := to_Sprite (the_Event.Pair,
|
||||
|
||||
@@ -762,7 +762,7 @@ is
|
||||
procedure add (Self : in out Item; the_Model : in openGL.Model.view)
|
||||
is
|
||||
begin
|
||||
log ("gel.World.add (the opengl Model) ~ the_Model.Id:" & the_Model.Id'Image);
|
||||
-- log ("gel.World.add (the opengl Model) ~ the_Model.Id:" & the_Model.Id'Image);
|
||||
|
||||
|
||||
if the_Model.Id = null_graphics_model_Id
|
||||
@@ -777,7 +777,9 @@ is
|
||||
|
||||
-- Emit a new model event.
|
||||
--
|
||||
log ("gel.World.add ~ emit new graphics model event");
|
||||
|
||||
-- log ("gel.World.add ~ emit new graphics model event");
|
||||
|
||||
declare
|
||||
the_Event : remote.World.new_graphics_model_Event;
|
||||
begin
|
||||
@@ -804,7 +806,7 @@ is
|
||||
|
||||
-- Emit a new model event.
|
||||
--
|
||||
log ("gel.World.add ~ emit new physics model event");
|
||||
-- log ("gel.World.add ~ emit new physics model event");
|
||||
declare
|
||||
the_Event : remote.World.new_physics_model_Event;
|
||||
begin
|
||||
@@ -929,35 +931,35 @@ is
|
||||
|
||||
-- Perform responses to events for all sprites.
|
||||
--
|
||||
-- declare
|
||||
-- use id_Maps_of_sprite;
|
||||
--
|
||||
-- all_Sprites : constant id_Maps_of_sprite.Map := Item'Class (Self).all_Sprites.fetch;
|
||||
-- Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||
-- the_Sprite : Sprite.view;
|
||||
-- begin
|
||||
-- while has_Element (Cursor)
|
||||
-- loop
|
||||
-- the_Sprite := Element (Cursor);
|
||||
--
|
||||
-- begin
|
||||
-- if not the_Sprite.is_Destroyed
|
||||
-- then
|
||||
-- the_Sprite.respond;
|
||||
-- end if;
|
||||
--
|
||||
-- exception
|
||||
-- when E : others =>
|
||||
-- new_Line (2);
|
||||
-- put_Line ("Error in 'gel.World.evolve' sprite response.");
|
||||
-- new_Line;
|
||||
-- put_Line (ada.Exceptions.exception_Information (E));
|
||||
-- new_Line (2);
|
||||
-- end;
|
||||
--
|
||||
-- next (Cursor);
|
||||
-- end loop;
|
||||
-- end;
|
||||
declare
|
||||
use id_Maps_of_sprite;
|
||||
|
||||
all_Sprites : constant id_Maps_of_sprite.Map := Item'Class (Self).all_Sprites.fetch;
|
||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||
the_Sprite : Sprite.view;
|
||||
begin
|
||||
while has_Element (Cursor)
|
||||
loop
|
||||
the_Sprite := Element (Cursor);
|
||||
|
||||
begin
|
||||
if not the_Sprite.is_Destroyed
|
||||
then
|
||||
the_Sprite.respond;
|
||||
end if;
|
||||
|
||||
exception
|
||||
when E : others =>
|
||||
new_Line (2);
|
||||
put_Line ("Error in 'gel.World.evolve' sprite response.");
|
||||
new_Line;
|
||||
put_Line (ada.Exceptions.exception_Information (E));
|
||||
new_Line (2);
|
||||
end;
|
||||
|
||||
next (Cursor);
|
||||
end loop;
|
||||
end;
|
||||
|
||||
end evolve;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user