all: Fix simple warnings and cosmetics.
This commit is contained in:
@@ -4,8 +4,6 @@ with
|
||||
system.RPC,
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
with ada.Text_IO; use ada.Text_IO;
|
||||
|
||||
|
||||
package body lace.event.make_Subject
|
||||
is
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
with
|
||||
lace.Observer,
|
||||
lace.Event.Containers,
|
||||
lace.Event.utility,
|
||||
lace.event.Containers,
|
||||
|
||||
ada.Containers.indefinite_Holders,
|
||||
ada.Text_IO,
|
||||
ada.Exceptions,
|
||||
ada.unchecked_Deallocation,
|
||||
|
||||
@@ -5,8 +5,6 @@ with
|
||||
private
|
||||
with
|
||||
lace.Subject,
|
||||
lace.event.Containers,
|
||||
ada.Containers.indefinite_Holders,
|
||||
ada.Containers.indefinite_Vectors;
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ with
|
||||
lace.Event.utility,
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
with ada.Text_IO; use ada.Text_IO;
|
||||
|
||||
|
||||
package body lace.event.make_Observer.deferred
|
||||
is
|
||||
|
||||
@@ -2,8 +2,7 @@ with
|
||||
ada.Characters.latin_1,
|
||||
ada.Directories,
|
||||
ada.Direct_IO,
|
||||
ada.Streams.Stream_IO,
|
||||
ada.Text_IO;
|
||||
ada.Streams.Stream_IO;
|
||||
|
||||
|
||||
package body lace.Text.forge
|
||||
|
||||
@@ -6,7 +6,6 @@ with
|
||||
openGL.Model.Box.textured,
|
||||
openGL.Model.Box.lit_colored_textured,
|
||||
|
||||
openGL.texture_Set,
|
||||
openGL.Palette,
|
||||
openGL.Demo;
|
||||
|
||||
|
||||
@@ -3,12 +3,9 @@ with
|
||||
openGL.Buffer.general,
|
||||
openGL.Program,
|
||||
openGL.Attribute,
|
||||
openGL.Texture,
|
||||
openGL.Palette,
|
||||
openGL.Tasks,
|
||||
openGL.Errors,
|
||||
|
||||
GL.Binding,
|
||||
GL.lean,
|
||||
GL.Pointers,
|
||||
|
||||
@@ -29,7 +26,6 @@ is
|
||||
vertex_Shader : aliased Shader.item;
|
||||
fragment_Shader : aliased Shader.item;
|
||||
the_Program : openGL.Program.view;
|
||||
white_Texture : openGL.Texture.Object;
|
||||
|
||||
Name_1 : constant String := "Site";
|
||||
Name_2 : constant String := "Color";
|
||||
@@ -64,8 +60,7 @@ is
|
||||
if the_Program = null
|
||||
then -- Define the shaders and program.
|
||||
declare
|
||||
use Palette,
|
||||
Attribute.Forge;
|
||||
use Attribute.Forge;
|
||||
|
||||
Sample : Vertex;
|
||||
|
||||
@@ -73,10 +68,7 @@ is
|
||||
Attribute_2 : Attribute.view;
|
||||
Attribute_3 : Attribute.view;
|
||||
|
||||
white_Image : constant Image := [1 .. 2 => [1 .. 2 => +White]];
|
||||
begin
|
||||
white_Texture := openGL.Texture.Forge.to_Texture (white_Image);
|
||||
|
||||
vertex_Shader .define (Shader.Vertex, "assets/opengl/shader/colored_textured.vert");
|
||||
fragment_Shader.define (Shader.Fragment, (asset_Names' (1 => to_Asset ("assets/opengl/shader/version.header"),
|
||||
2 => to_Asset ("assets/opengl/shader/texturing-frag.snippet"),
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
with
|
||||
openGL.texture_Set;
|
||||
|
||||
|
||||
private
|
||||
with
|
||||
openGL.Geometry.texturing;
|
||||
@@ -54,13 +50,4 @@ private
|
||||
end record;
|
||||
|
||||
|
||||
-- type Item is new Geometry.item with
|
||||
-- record
|
||||
-- null;
|
||||
-- end record;
|
||||
--
|
||||
--
|
||||
-- overriding
|
||||
-- procedure enable_Textures (Self : in out Item);
|
||||
|
||||
end openGL.Geometry.colored_textured;
|
||||
|
||||
@@ -81,8 +81,8 @@ is
|
||||
vertex_Count : constant Index_t := Index_t (sides_Count * 2 + 2); -- 2 triangles per side plus 2 since we cannot share the first and last edge.
|
||||
indices_Count : constant long_Index_t := long_Index_t (sides_Count * 2 * 3); -- 2 triangles per side with 3 vertices per triangle.
|
||||
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := (1 .. vertex_Count => <>);
|
||||
the_Indices : aliased Indices := (1 .. indices_Count => <>);
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := [1 .. vertex_Count => <>];
|
||||
the_Indices : aliased Indices := [1 .. indices_Count => <>];
|
||||
|
||||
begin
|
||||
ny := 1.0;
|
||||
@@ -190,14 +190,14 @@ is
|
||||
indices_Count : constant long_Index_t := long_Index_t ( (hoop_count - 1) * sides_Count * 2 * 3 -- For each hoop, 2 triangles per side with 3 vertices per triangle
|
||||
+ sides_Count * 3); -- plus the extra indices for the pole triangles.
|
||||
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := (1 .. vertex_Count => <>);
|
||||
the_Indices : aliased Indices := (1 .. indices_Count => <>);
|
||||
the_Vertices : aliased Geometry.textured.Vertex_array := [1 .. vertex_Count => <>];
|
||||
the_Indices : aliased Indices := [1 .. indices_Count => <>];
|
||||
|
||||
the_arch_Edges : arch_Edges;
|
||||
i : Index_t := 1;
|
||||
|
||||
pole_Site : constant Site := (if is_Fore then (0.0, 0.0, L + Radius)
|
||||
else (0.0, 0.0, -L - Radius));
|
||||
pole_Site : constant Site := (if is_Fore then [0.0, 0.0, L + Radius]
|
||||
else [0.0, 0.0, -L - Radius]);
|
||||
|
||||
Degrees_90 : constant := Pi / 2.0;
|
||||
Degrees_360 : constant := Pi * 2.0;
|
||||
@@ -375,9 +375,9 @@ is
|
||||
cap_1_Geometry .Model_is (Self.all'unchecked_Access);
|
||||
cap_2_Geometry .Model_is (Self.all'unchecked_Access);
|
||||
|
||||
return (1 => the_shaft_Geometry.all'Access,
|
||||
return [1 => the_shaft_Geometry.all'Access,
|
||||
2 => cap_1_Geometry.all'Access,
|
||||
3 => cap_2_Geometry.all'Access);
|
||||
3 => cap_2_Geometry.all'Access];
|
||||
end to_GL_Geometries;
|
||||
|
||||
|
||||
|
||||
@@ -3,8 +3,7 @@ with
|
||||
openGL.IO,
|
||||
openGL.texture_Set,
|
||||
|
||||
ada.unchecked_Deallocation,
|
||||
ada.unchecked_Conversion;
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
package body openGL.Terrain
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
--
|
||||
with c_math_c.Vector_3;
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
with Interfaces.C.Pointers;
|
||||
|
||||
package box2d_c.b2d_Contact is
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
--
|
||||
with c_math_c.Vector_3;
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
with Interfaces.C.Pointers;
|
||||
|
||||
package box2d_c.b2d_point_Collision is
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
with c_math_c;
|
||||
with c_math_c.Vector_3;
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
with Interfaces.C.Pointers;
|
||||
|
||||
package box2d_c.b2d_ray_Collision is
|
||||
|
||||
@@ -13,8 +13,6 @@ with c_math_c.Vector_2;
|
||||
with c_math_c.Vector_3;
|
||||
with Interfaces.C;
|
||||
with swig;
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
|
||||
package box2d_c.Binding is
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
-- This file is generated by SWIG. Please do not modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
with Interfaces.C.Pointers;
|
||||
|
||||
package box2d_c.joint_Cursor is
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
-- This file is generated by SWIG. Please do not modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
with Interfaces.C.Pointers;
|
||||
with System;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
--
|
||||
with swig;
|
||||
with Interfaces.C;
|
||||
use Interfaces.C;
|
||||
|
||||
package box2d_c is
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ with
|
||||
c_math_c.Vector_2,
|
||||
c_math_c.Conversion,
|
||||
|
||||
ada.unchecked_Deallocation,
|
||||
ada.unchecked_Conversion;
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
package body box2d_Physics.Shape
|
||||
is
|
||||
|
||||
@@ -16,8 +16,6 @@ with
|
||||
|
||||
ada.unchecked_Conversion;
|
||||
|
||||
with ada.Text_IO; use ada.Text_IO;
|
||||
|
||||
|
||||
package body box2d_Physics.Space
|
||||
is
|
||||
|
||||
@@ -7,10 +7,10 @@ with
|
||||
c_math_c.Triangle,
|
||||
|
||||
ada.unchecked_Deallocation,
|
||||
ada.Unchecked_Conversion,
|
||||
|
||||
interfaces.C;
|
||||
|
||||
|
||||
package body bullet_Physics.Shape
|
||||
is
|
||||
use c_math_c.Conversion,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
with openGL.texture_Set;
|
||||
with
|
||||
gel.Applet.gui_World,
|
||||
gel.Window.setup,
|
||||
@@ -8,8 +7,8 @@ with
|
||||
physics.Model,
|
||||
|
||||
openGL.Model.any,
|
||||
openGL.Light,
|
||||
openGL.texture_Set,
|
||||
openGL.Light,
|
||||
|
||||
ada.Calendar,
|
||||
ada.Text_IO,
|
||||
@@ -86,7 +85,7 @@ begin
|
||||
the_Human.Site_is ([0.0, 5.0, 0.0]); --
|
||||
|
||||
-- the_Applet.gui_World.add (the_Cobra); -- Add cobra.
|
||||
the_Cobra.Site_is ((0.0, 5.0, 0.0)); --
|
||||
the_Cobra.Site_is ([0.0, 5.0, 0.0]); --
|
||||
|
||||
the_Applet.gui_Camera.Site_is ([0.0, 1.5, 2.6]); -- Position the camera.
|
||||
-- the_Applet.gui_Camera.Site_is ((0.0, 100.0, 0.0)); -- Position the camera.
|
||||
|
||||
@@ -17,8 +17,7 @@ procedure launch_text_sprite_Demo
|
||||
-- Shows a few text sprites.
|
||||
--
|
||||
is
|
||||
use gel.Math,
|
||||
openGL.Palette;
|
||||
use openGL.Palette;
|
||||
|
||||
the_Applet : constant gel.Applet.gui_World.view := gel.Forge.new_gui_Applet ("text sprite Demo",
|
||||
space_Kind => physics.Bullet);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
with
|
||||
gel.Events,
|
||||
gel.Camera.forge,
|
||||
lace.Event.utility,
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
@@ -11,8 +9,6 @@ is
|
||||
procedure define (Self : in gel.Applet.client_world.view; Name : in String;
|
||||
space_Kind : in physics.space_Kind)
|
||||
is
|
||||
use lace.Event.utility;
|
||||
|
||||
the_world_Info : constant world_Info_view := new world_Info;
|
||||
the_Camera : constant gel.Camera.View := gel.Camera.forge.new_Camera;
|
||||
begin
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
with
|
||||
gel.Events,
|
||||
gel.Camera.forge,
|
||||
lace.Event.utility,
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
@@ -11,8 +9,6 @@ is
|
||||
procedure define (Self : in gel.Applet.server_world.view; Name : in String;
|
||||
space_Kind : in physics.space_Kind)
|
||||
is
|
||||
use lace.Event.utility;
|
||||
|
||||
the_world_Info : constant world_Info_view := new world_Info;
|
||||
the_Camera : constant gel.Camera.View := gel.Camera.forge.new_Camera;
|
||||
begin
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
with
|
||||
gel.World.simple,
|
||||
gel.Camera.forge,
|
||||
gel.Events,
|
||||
|
||||
lace.Event.utility;
|
||||
gel.Camera.forge;
|
||||
|
||||
|
||||
package body gel.Applet.gui_and_sim_world
|
||||
@@ -13,7 +10,6 @@ is
|
||||
use_Window : in gel.Window.view)
|
||||
is
|
||||
pragma Unreferenced (use_Window);
|
||||
use lace.Event.utility;
|
||||
begin
|
||||
declare
|
||||
the_world_Info : constant world_Info_view := new world_Info;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
with
|
||||
gel.World.simple,
|
||||
gel.Events,
|
||||
gel.Camera.forge,
|
||||
lace.Event.utility,
|
||||
ada.unchecked_Deallocation;
|
||||
|
||||
|
||||
@@ -12,8 +10,6 @@ is
|
||||
procedure define (Self : in gel.Applet.gui_world.view; Name : in String;
|
||||
space_Kind : in physics.space_Kind)
|
||||
is
|
||||
use lace.Event.utility;
|
||||
|
||||
the_world_Info : constant world_Info_view := new world_Info;
|
||||
the_Camera : constant gel.Camera.View := gel.Camera.forge.new_Camera;
|
||||
begin
|
||||
|
||||
@@ -11,7 +11,6 @@ with
|
||||
|
||||
lace.Event.utility,
|
||||
|
||||
ada.unchecked_Conversion,
|
||||
ada.unchecked_Deallocation,
|
||||
ada.Text_IO;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
with openGL.texture_Set;
|
||||
with
|
||||
openGL.Model.text .lit_colored,
|
||||
|
||||
@@ -23,12 +22,8 @@ with
|
||||
openGL.Model.line .colored,
|
||||
openGL.Model.segment_line,
|
||||
|
||||
openGL.Palette,
|
||||
openGL.texture_Set,
|
||||
|
||||
physics.Model,
|
||||
gel.Window;
|
||||
-- float_Math.Random;
|
||||
|
||||
|
||||
package body gel.Forge
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
with any_math.any_Algebra.any_linear.any_d3;
|
||||
with
|
||||
gel.Events,
|
||||
|
||||
|
||||
@@ -90,51 +90,6 @@ is
|
||||
|
||||
|
||||
|
||||
|
||||
-- TODO: Rid this ...
|
||||
|
||||
function to_Sprite (the_Pair : in remote.World.sprite_model_Pair;
|
||||
the_graphics_Models : in Id_Maps_of_graphics_Model.Map;
|
||||
the_physics_Models : in Id_Maps_of_physics_Model .Map;
|
||||
the_World : in gel.World.view) return gel.Sprite.view
|
||||
is
|
||||
the_graphics_Model : access openGL .Model.item'Class;
|
||||
the_physics_Model : access physics.Model.item'Class;
|
||||
the_Sprite : gel.Sprite.view;
|
||||
|
||||
use openGL;
|
||||
begin
|
||||
the_graphics_Model := openGL .Model.view (the_graphics_Models .Element (the_Pair.graphics_Model_Id));
|
||||
the_physics_Model := physics.Model.view (the_physics_Models.Element (the_Pair. physics_Model_Id));
|
||||
|
||||
the_Sprite := gel.Sprite.forge.new_Sprite ("2Sprite" & the_Pair.sprite_Id'Image,
|
||||
sprite.World_view (the_World),
|
||||
get_Translation (the_Pair.Transform),
|
||||
get_Rotation (the_Pair.Transform),
|
||||
the_graphics_Model,
|
||||
the_physics_Model,
|
||||
owns_Graphics => False,
|
||||
owns_Physics => False,
|
||||
is_Kinematic => the_Pair.Mass /= 0.0);
|
||||
|
||||
the_Sprite.Id_is (Now => the_Pair.sprite_Id);
|
||||
the_Sprite.is_Visible (Now => the_Pair.is_Visible);
|
||||
|
||||
the_Sprite.Site_is (get_Translation (the_Pair.Transform));
|
||||
the_Sprite.Spin_is (get_Rotation (the_Pair.Transform));
|
||||
|
||||
the_Sprite.desired_Dynamics_are (Site => the_Sprite.Site,
|
||||
Spin => to_Quaternion (get_Rotation (the_Sprite.Transform)));
|
||||
|
||||
-- the_Sprite.desired_Site_is (the_Sprite.Site);
|
||||
-- the_Sprite.desired_Spin_is (to_Quaternion (get_Rotation (the_Sprite.Transform)));
|
||||
|
||||
return the_Sprite;
|
||||
end to_Sprite;
|
||||
|
||||
-- pragma Unreferenced (to_Sprite);
|
||||
|
||||
|
||||
----------
|
||||
--- Define
|
||||
--
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
with
|
||||
ada.unchecked_Conversion;
|
||||
|
||||
limited
|
||||
with
|
||||
openGL.Renderer.lean;
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
with any_math.any_Algebra.any_linear.any_d3;
|
||||
with
|
||||
gel.Events,
|
||||
|
||||
physics.Object,
|
||||
physics.Forge,
|
||||
|
||||
@@ -9,6 +6,7 @@ with
|
||||
|
||||
lace.Response,
|
||||
lace.Text.Forge,
|
||||
lace.Event,
|
||||
|
||||
ada.Text_IO,
|
||||
ada.Exceptions,
|
||||
@@ -1045,8 +1043,7 @@ is
|
||||
overriding
|
||||
function Sprites (Self : in out Item) return remote.World.sprite_model_Pairs
|
||||
is
|
||||
use id_Maps_of_sprite,
|
||||
lace.Text;
|
||||
use id_Maps_of_sprite;
|
||||
|
||||
all_Sprites : id_Maps_of_sprite.Map renames Item'Class (Self).all_Sprites.fetch;
|
||||
Cursor : id_Maps_of_sprite.Cursor := all_Sprites.First;
|
||||
|
||||
@@ -8,14 +8,11 @@ with
|
||||
physics.Space,
|
||||
physics.Model,
|
||||
|
||||
lace.Event,
|
||||
lace.Observer,
|
||||
lace.Subject,
|
||||
lace.Subject_and_deferred_Observer,
|
||||
lace.Any,
|
||||
|
||||
ada.Streams,
|
||||
ada.Tags.generic_dispatching_Constructor,
|
||||
ada.unchecked_Conversion,
|
||||
ada.Containers.hashed_Maps;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
with
|
||||
launch_simple_chat_Client,
|
||||
launch_simple_chat_Registrar,
|
||||
-- launch_simple_chat_Client,
|
||||
-- launch_simple_chat_Registrar,
|
||||
launch_simple_instant_events_demo,
|
||||
launch_simple_deferred_events_demo,
|
||||
|
||||
@@ -47,8 +47,8 @@ with
|
||||
-- launch_hello_physics_interface_Demo,
|
||||
launch_test_Engine,
|
||||
|
||||
launch_Client,
|
||||
launch_Server,
|
||||
-- launch_Client,
|
||||
-- launch_Server,
|
||||
-- launch_Pong,
|
||||
launch_Hello_gel,
|
||||
launch_opengl_Model,
|
||||
@@ -72,8 +72,8 @@ procedure build_all_Lace
|
||||
--
|
||||
is
|
||||
begin
|
||||
launch_simple_chat_Client;
|
||||
launch_simple_chat_Registrar;
|
||||
-- launch_simple_chat_Client;
|
||||
-- launch_simple_chat_Registrar;
|
||||
launch_simple_deferred_events_Demo;
|
||||
launch_simple_instant_events_Demo;
|
||||
|
||||
@@ -120,8 +120,8 @@ begin
|
||||
-- launch_hello_physics_interface_Demo;
|
||||
launch_Test_Engine;
|
||||
|
||||
launch_Client;
|
||||
launch_Server;
|
||||
-- launch_Client;
|
||||
-- launch_Server;
|
||||
-- launch_Pong;
|
||||
launch_Hello_gel;
|
||||
launch_opengl_Model;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
with
|
||||
"../../../1-base/lace/applet/demo/event/distributed/simple_chat",
|
||||
-- "../../../1-base/lace/applet/demo/event/distributed/simple_chat",
|
||||
"../../../1-base/lace/applet/demo/event/simple/deferred/lace_simple_deferred_events_demo",
|
||||
"../../../1-base/lace/applet/demo/event/simple/instant/lace_simple_instant_events_demo",
|
||||
"../../../1-base/lace/applet/demo/event/simple/lace_demo",
|
||||
@@ -77,7 +77,7 @@ with
|
||||
"../../../3-mid/physics/interface/applet/demo/test_engine/test_engine",
|
||||
"physics",
|
||||
|
||||
"../../../4-high/gel/applet/demo/distributed/dsa/demo_dsa",
|
||||
-- "../../../4-high/gel/applet/demo/distributed/dsa/demo_dsa",
|
||||
"../../../4-high/gel/applet/demo/distributed/fused/gel_fused",
|
||||
"../../../4-high/gel/applet/demo/game/box2d_test/gel_box2d_test",
|
||||
-- "../../../4-high/gel/applet/demo/game/pong-gtk/pong",
|
||||
|
||||
Reference in New Issue
Block a user