Small Imp UI theme change and part of player informations...
@ -16,6 +16,7 @@ package chad is
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
title : access string;
|
||||
kind : faction.enumeration;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
@ -29,6 +30,7 @@ package chad is
|
||||
type information is record
|
||||
index : enumeration := ada;
|
||||
state : core.animation := core.idle;
|
||||
level : natural := 1;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
health : core.point := (12, 12);
|
||||
@ -50,12 +52,12 @@ package chad is
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
description : constant array (enumeration) of definition := (
|
||||
ada => (new string'("Ada Augusta King"), faction.fairy, attribute.defense, skill.diplomacy, resource.metal),
|
||||
richard => (new string'("Richard Martin Stallman"), faction.dwarf, attribute.offense, skill.leadership, resource.wood),
|
||||
ognjen => (new string'("Ognjen Milan Robovic"), faction.kobold, attribute.stamina, skill.archery, resource.leather),
|
||||
wouter => (new string'("Wouter van Oortmerssen"), faction.gnoll, attribute.speed, skill.medicine, resource.stone),
|
||||
john => (new string'("John Warner Backus"), faction.goblin, attribute.wisdom, skill.sorcery, resource.gem),
|
||||
marina => (new string'("Marina Ann Hantzis"), faction.imp, attribute.reach, skill.necromancy, resource.gold)
|
||||
ada => (new string'("Ada Augusta King"), new string'("Guardian"), faction.fairy, attribute.defense, skill.diplomacy, resource.metal),
|
||||
richard => (new string'("Richard Martin Stallman"), new string'("Prophet"), faction.dwarf, attribute.offense, skill.leadership, resource.wood),
|
||||
ognjen => (new string'("Ognjen Milan Robovic"), new string'("Wanderer"), faction.kobold, attribute.stamina, skill.archery, resource.leather),
|
||||
wouter => (new string'("Wouter van Oortmerssen"), new string'("Battlemage"), faction.gnoll, attribute.speed, skill.medicine, resource.stone),
|
||||
john => (new string'("John Warner Backus"), new string'("Sorcerer"), faction.goblin, attribute.wisdom, skill.sorcery, resource.gem),
|
||||
marina => (new string'("Marina Ann Hantzis"), new string'("Necromancer"), faction.imp, attribute.reach, skill.necromancy, resource.gold)
|
||||
);
|
||||
|
||||
view_width : constant integer := 64;
|
||||
|
@ -148,15 +148,35 @@ procedure main is
|
||||
begin
|
||||
ui.draw_frame ("--", x, y, width, height);
|
||||
ui.draw_sprite (chad.view (player.index), chad.description (player.index).name.all, x + offset, y + offset, 0);
|
||||
ui.draw_text_box (x + chad.view_width + 2 * offset, y + offset, width - chad.view_width - 3 * offset, core.icon);
|
||||
ui.write (chad.description (player.index).name.all, x + chad.view_width + 2 * offset + 5, y + offset + 5);
|
||||
ui.draw_text_box (x + chad.view_width + offset, y + offset, width - chad.view_width - 2 * offset, core.icon);
|
||||
ui.write (chad.description (player.index).name.all, x + chad.view_width + offset + 5, y + offset + 5);
|
||||
--
|
||||
declare move_x : integer := x + chad.view_width + 2 * offset;
|
||||
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
||||
y => y + core.icon + offset,
|
||||
width => width - chad.view_width - attribute.count * core.icon - 2 * offset,
|
||||
height => core.icon);
|
||||
--
|
||||
ui.write (text => chad.description (player.index).title.all,
|
||||
x => x + chad.view_width + attribute.count * core.icon + offset + 10,
|
||||
y => y + core.icon + offset + 10,
|
||||
code => true);
|
||||
--
|
||||
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
||||
y => y + 2 * core.icon + offset,
|
||||
width => width - chad.view_width - attribute.count * core.icon - 2 * offset,
|
||||
height => core.icon);
|
||||
--
|
||||
ui.write (text => "Level" & player.level'image,
|
||||
x => x + chad.view_width + attribute.count * core.icon + offset + 10,
|
||||
y => y + 2 * core.icon + offset + 10,
|
||||
code => true);
|
||||
--
|
||||
declare move_x : integer := x + chad.view_width + offset;
|
||||
begin
|
||||
for index in attribute.enumeration loop
|
||||
ui.draw_icon (attribute.icon (index), attribute.description (index).text.all, move_x, y + core.icon + offset);
|
||||
ui.draw_text_box (move_x, y + 2 * core.icon + offset, core.icon, core.icon);
|
||||
ui.write (player.attributes (index).value'image, move_x + 3, y + 2 * core.icon + offset + 9, code => true);
|
||||
ui.write (player.attributes (index).value'image, move_x + 5, y + 2 * core.icon + offset + 10, code => true);
|
||||
--
|
||||
move_x := move_x + core.icon;
|
||||
end loop;
|
||||
|
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 115 B After Width: | Height: | Size: 115 B |
Before Width: | Height: | Size: 106 B After Width: | Height: | Size: 118 B |
Before Width: | Height: | Size: 116 B After Width: | Height: | Size: 116 B |