Refactoring and F keys...
This commit is contained in:
parent
0455f9e655
commit
724a037413
@ -35,7 +35,7 @@ package body construction is
|
||||
begin
|
||||
draw (index, x, y);
|
||||
--
|
||||
if core.cursor_inside (x, y, sprite (index).width, sprite (index).height) and core.cursor_mode = core.cursor_right and not ui.prioritize then
|
||||
if core.cursor_inside (x, y, sprite (index).width, sprite (index).height) and core.cursor_mode = core.cursor_middle and not ui.prioritize then
|
||||
core.write_text_box (trait (index).name);
|
||||
end if;
|
||||
end draw_plus;
|
||||
|
@ -282,17 +282,6 @@ package body core is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure render_pixel (x, y : in integer; tint : in colour) is
|
||||
new_tint : ray.colour := (r => ray.colour_range (tint.r),
|
||||
g => ray.colour_range (tint.g),
|
||||
b => ray.colour_range (tint.b),
|
||||
a => ray.colour_range (tint.a));
|
||||
begin
|
||||
ray.image_pixel (global_image, x, y, new_tint);
|
||||
end render_pixel;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure export_image (file_path : in string) is
|
||||
ignore : integer;
|
||||
begin
|
||||
@ -303,13 +292,6 @@ package body core is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure convert_image_to_texture is
|
||||
begin
|
||||
global_texture := ray.image_deport (global_image);
|
||||
end convert_image_to_texture;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (data : in sprite := (others => 0);
|
||||
x : in integer := 0;
|
||||
y : in integer := 0;
|
||||
@ -517,6 +499,7 @@ package body core is
|
||||
case signal is
|
||||
when 48 .. 57 => signal_mode := signal_code'val (signal - 48 + signal_code'pos (signal_0));
|
||||
when 65 .. 90 => signal_mode := signal_code'val (signal - 65 + signal_code'pos (signal_a));
|
||||
when 290 .. 301 => signal_mode := signal_code'val (signal - 290 + signal_code'pos (signal_f1));
|
||||
when 320 .. 329 => signal_mode := signal_code'val (signal - 320 + signal_code'pos (signal_kp_0));
|
||||
--
|
||||
when 0 => signal_mode := signal_none;
|
||||
|
@ -28,7 +28,9 @@ package core is
|
||||
signal_backspace, signal_right, signal_left, signal_down, signal_up, signal_kp_0,
|
||||
signal_kp_1, signal_kp_2, signal_kp_3, signal_kp_4, signal_kp_5, signal_kp_6,
|
||||
signal_kp_7, signal_kp_8, signal_kp_9, signal_kp_subtract, signal_kp_add, signal_left_shift,
|
||||
signal_left_control
|
||||
signal_left_control, signal_f1, signal_f2, signal_f3, signal_f4, signal_f5,
|
||||
signal_f6, signal_f7, signal_f8, signal_f9, signal_f10, signal_f11,
|
||||
signal_f12
|
||||
);
|
||||
|
||||
type animation is (
|
||||
@ -99,8 +101,7 @@ package core is
|
||||
help_box : string_box_data;
|
||||
text_box : string_box_data;
|
||||
|
||||
global_image : ray.image;
|
||||
global_texture : ray.texture;
|
||||
global_image : ray.image;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -143,11 +144,8 @@ package core is
|
||||
|
||||
procedure create_image (width, height : in integer);
|
||||
procedure render_image (data : in sprite; x, y, u, v, width, height : in integer);
|
||||
procedure render_pixel (x, y : in integer; tint : in colour);
|
||||
procedure export_image (file_path : in string);
|
||||
|
||||
procedure convert_image_to_texture;
|
||||
|
||||
procedure draw (data : in sprite := (others => 0);
|
||||
x : in integer := 0;
|
||||
y : in integer := 0;
|
||||
|
@ -42,7 +42,7 @@ package body equipment is
|
||||
draw (index, state, x, y);
|
||||
--
|
||||
if core.cursor_inside (x, y, sprite (index).width, sprite (index).height)
|
||||
and core.cursor_mode = core.cursor_right
|
||||
and core.cursor_mode = core.cursor_middle
|
||||
and index / none
|
||||
and not ui.prioritize then
|
||||
core.write_text_box (trait (index).name);
|
||||
|
@ -425,29 +425,6 @@ package body world is
|
||||
map.chads (map.chad_count) := data;
|
||||
end add_chad;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_minimap (x, y, width, height : in integer) is
|
||||
minimap : core.sprite;
|
||||
begin
|
||||
--~ui.draw_frame ("--", x, y, width, height);
|
||||
--~--
|
||||
--~core.create_image (map.width, map.height);
|
||||
--~--
|
||||
--~for image_x in 0 .. map.width - 1 loop
|
||||
--~for image_y in 0 .. map.height - 1 loop
|
||||
--~if map.views (image_x, image_y) then
|
||||
--~core.render_pixel (image_x, image_y, (255, 255, 255, 255));
|
||||
--~else
|
||||
--~core.render_pixel (image_x, image_y, (0, 0, 0, 255));
|
||||
--~end if;
|
||||
--~end loop;
|
||||
--~end loop;
|
||||
--~--
|
||||
--~minimap := core.import_image ();
|
||||
null;
|
||||
end draw_minimap;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end world;
|
||||
|
@ -126,8 +126,6 @@ package world is
|
||||
|
||||
procedure add_chad (data : in chad.value);
|
||||
|
||||
procedure draw_minimap (x, y, width, height : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end world;
|
||||
|
Loading…
Reference in New Issue
Block a user