Browse Source

Minor changes that ease the work...

master
parent
commit
0653ca2f57
17 changed files with 23 additions and 38 deletions
  1. +0
    -1
      .gitignore
  2. +0
    -2
      source/ai.adb
  3. +0
    -2
      source/attribute.adb
  4. +0
    -2
      source/chad.adb
  5. +0
    -2
      source/construction.adb
  6. +18
    -2
      source/core.adb
  7. +0
    -2
      source/deity.adb
  8. +0
    -2
      source/effect.adb
  9. +0
    -2
      source/faction.adb
  10. +0
    -2
      source/item.adb
  11. +0
    -2
      source/magic.adb
  12. +0
    -2
      source/might.adb
  13. +0
    -2
      source/resource.adb
  14. +0
    -2
      source/skill.adb
  15. +0
    -2
      source/ui.adb
  16. +0
    -2
      source/unit.adb
  17. +5
    -7
      source/world.adb

+ 0
- 1
.gitignore View File

@@ -1,4 +1,3 @@
source/*.o
source/*.ali
xhads
song/*

+ 0
- 2
source/ai.adb View File

@@ -4,8 +4,6 @@

with core, ui, ai;

use ai;

package body ai is

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


+ 0
- 2
source/attribute.adb View File

@@ -4,8 +4,6 @@

with core, ui, attribute;

use attribute;

package body attribute is

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


+ 0
- 2
source/chad.adb View File

@@ -4,8 +4,6 @@

with core, ui, faction, chad;

use chad;

package body chad is

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


+ 0
- 2
source/construction.adb View File

@@ -4,8 +4,6 @@

with core, effect, resource, faction, construction;

use construction;

package body construction is

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


+ 18
- 2
source/core.adb View File

@@ -4,8 +4,6 @@

with core;

use core;

package body core is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -85,6 +83,18 @@ package body core is
procedure pause_sound (data : sound) with import => true, convention => c, external_name => "PauseSound";
procedure resume_sound (data : sound) with import => true, convention => c, external_name => "ResumeSound";

procedure megadraw (
data : texture;
uv : rectangle;
view : rectangle;
origin : vessel;
rotate : float;
tint : color
) with
import => true,
convention => c,
external_name => "DrawTexturePro";

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

texture_count : integer := 0;
@@ -482,6 +492,12 @@ package body core is
uv => (float (u), float (v), float (width), float (height)),
view => (float (x), float (y)),
tint => (255, 255, 255, 255));
--~megadraw (data => texture_array (sprite),
--~uv => (float (u), float (v), float (width), float (height)),
--~view => (0.0, 0.0, float (x), float (y)),
--~origin => (0.0, 0.0),
--~rotate => 0.0,
--~tint => (255, 255, 255, 255));
end render_sprite;

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


+ 0
- 2
source/deity.adb View File

@@ -4,8 +4,6 @@

with core, deity;

use deity;

package body deity is

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


+ 0
- 2
source/effect.adb View File

@@ -4,8 +4,6 @@

with core, effect;

use effect;

package body effect is

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


+ 0
- 2
source/faction.adb View File

@@ -4,8 +4,6 @@

with core, attribute, skill, resource, faction;

use faction;

package body faction is

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


+ 0
- 2
source/item.adb View File

@@ -4,8 +4,6 @@

with core, item;

use item;

package body item is

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


+ 0
- 2
source/magic.adb View File

@@ -4,8 +4,6 @@

with core, ui, effect, magic;

use magic;

package body magic is

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


+ 0
- 2
source/might.adb View File

@@ -4,8 +4,6 @@

with core, ui, effect, might;

use might;

package body might is

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


+ 0
- 2
source/resource.adb View File

@@ -4,8 +4,6 @@

with core, ui, resource;

use resource;

package body resource is

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


+ 0
- 2
source/skill.adb View File

@@ -4,8 +4,6 @@

with core, ui, skill;

use skill;

package body skill is

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


+ 0
- 2
source/ui.adb View File

@@ -4,8 +4,6 @@

with core, ui;

use ui;

package body ui is

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


+ 0
- 2
source/unit.adb View File

@@ -4,8 +4,6 @@

with core, ui, effect, attribute, faction, unit;

use unit;

package body unit is

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


+ 5
- 7
source/world.adb View File

@@ -2,11 +2,8 @@
--
-- GNU General Public Licence (version 3 or later)

--~with ada.strings.fixed;
with core, resource, item, unit, construction, world;

use world;

package body world is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -40,12 +37,12 @@ package body world is
--
for index in codex
loop
landmarks (index) := new sprite_array (0 .. limit (index));
for value in 0 .. limit (index)
landmarks (index) := new sprite_array (0 .. limit (index) - 1);
--
for value in 0 .. limit (index) - 1
loop
declare
folder : constant string := core.lowercase (codex'image (index));
--~file : constant string := ada.strings.fixed.trim (value'image, ada.strings.left);
file : constant string := value'image;
begin
landmarks (index) (value) := core.import_sprite ("./sprite/world/landmark/" & folder & "/" & file & ".png", 1, 1);
@@ -59,6 +56,7 @@ package body world is
procedure make (index : in codex; width, height : in natural) is
begin
core.echo (core.comment, "-- Procedurally generating new map...");
--
core.echo (core.comment, "-- -- Map type : " & index'image);
core.echo (core.comment, "-- -- Map width :" & width'image);
core.echo (core.comment, "-- -- Map height :" & height'image);
@@ -84,7 +82,7 @@ package body world is
--
for object in 0 .. landmark_limit
loop
map.landmark (object).index := core.random_integer (0, limit (index));
map.landmark (object).index := core.random_integer (0, limit (index) - 1);
map.landmark (object).x := core.base * core.random_integer (1, map.width - 1);
map.landmark (object).y := core.base * core.random_integer (1, map.height - 1);
end loop;


Loading…
Cancel
Save