Pārlūkot izejas kodu

Added in-world-preview map frame rendering...

master
Ognjen Milan Robovic pirms 1 nedēļas
vecāks
revīzija
7e660f394a
4 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  1. +1
    -1
      source/ui.adb
  2. +1
    -1
      source/ui.ads
  3. +2
    -2
      source/unit.adb
  4. +5
    -0
      source/world.adb

+ 1
- 1
source/ui.adb Parādīt failu

@@ -432,7 +432,7 @@ package body ui is

------------------------------------------------------------------------------------------

procedure draw_icon_menu (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access) is
procedure draw_icon_menu (x, y, width, height : in integer) is
offset_x : constant integer := sprite (active, icon_upper_left).width;
offset_y : constant integer := sprite (active, icon_upper_left).height;
begin


+ 1
- 1
source/ui.ads Parādīt failu

@@ -73,7 +73,7 @@ package ui is
procedure draw_menu (x, y, width, height : in integer);
procedure draw_tiny_menu (x, y, width, height : in integer);

procedure draw_icon_menu (description : in string; x, y, width, height : in integer; action : core.pointer := core.idle'access);
procedure draw_icon_menu (x, y, width, height : in integer);

procedure draw_state_box (x, y : in integer);



+ 2
- 2
source/unit.adb Parādīt failu

@@ -52,7 +52,7 @@ package body unit is
offset : constant integer := 4;
begin
core.draw (view_sprite (index), x + offset, y + offset);
ui.draw_icon_menu (trait (index).text, x, y, view_width + 2 * offset, view_height + 2 * offset);
ui.draw_icon_menu (x, y, view_width + 2 * offset, view_height + 2 * offset);
end view;

------------------------------------------------------------------------------------------
@@ -81,7 +81,7 @@ package body unit is
--
for animate in animation loop
draw (index, animate, move_x + offset + animation'pos (animate) * (sprite (index).width + 8), move_y + offset + 8 + core.icon * attribute.count);
ui.draw_icon_menu (trait (index).text, move_x + offset + animation'pos (animate) * (sprite (index).width + 8), move_y + offset + 8 + core.icon * attribute.count, sprite (index).width, sprite (index).height);
ui.draw_icon_menu (move_x + offset + animation'pos (animate) * (sprite (index).width + 8), move_y + offset + 8 + core.icon * attribute.count, sprite (index).width, sprite (index).height);
end loop;
end stat;



+ 5
- 0
source/world.adb Parādīt failu

@@ -113,6 +113,11 @@ package body world is
begin
view;
--
ui.draw_icon_menu (x => core.base * core.zoom * (-1- core.camera.x) + offset.x,
y => core.base * core.zoom * (-1- core.camera.y) + offset.y,
width => core.base * core.zoom * (map.width + 2),
height => core.base * core.zoom * (map.height + 2));
--
for vertical in 0 .. map.height - 1 loop
exit when offset.y + (vertical - core.camera.y) * core.base * core.zoom > core.window_height;
--


Notiek ielāde…
Atcelt
Saglabāt