소스 검색

Commiting...

master
부모
커밋
ab5dc8fcb0
13개의 변경된 파일304개의 추가작업 그리고 0개의 파일을 삭제
  1. +47
    -0
      ammunition.adb
  2. +5
    -0
      ammunition.ads
  3. +45
    -0
      animal.adb
  4. +5
    -0
      animal.ads
  5. +45
    -0
      armour.adb
  6. +5
    -0
      armour.ads
  7. +2
    -0
      compile.sh
  8. +45
    -0
      magic.adb
  9. +5
    -0
      magic.ads
  10. +45
    -0
      monster.adb
  11. +5
    -0
      monster.ads
  12. +45
    -0
      plant.adb
  13. +5
    -0
      plant.ads

+ 47
- 0
ammunition.adb 파일 보기

@@ -0,0 +1,47 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body ammunition is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.ammunition, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

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

end ammunition;

+ 5
- 0
ammunition.ads 파일 보기

@@ -52,4 +52,9 @@ package ammunition is

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

procedure generate;
procedure render;

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

end ammunition;

+ 45
- 0
animal.adb 파일 보기

@@ -0,0 +1,45 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body animal is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.animal, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

end animal;

+ 5
- 0
animal.ads 파일 보기

@@ -134,4 +134,9 @@ package animal is

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

procedure generate;
procedure render;

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

end animal;

+ 45
- 0
armour.adb 파일 보기

@@ -0,0 +1,45 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body armour is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.armour, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

end armour;

+ 5
- 0
armour.ads 파일 보기

@@ -53,4 +53,9 @@ package armour is

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

procedure generate;
procedure render;

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

end armour;

+ 2
- 0
compile.sh 파일 보기

@@ -2,6 +2,8 @@

set -xe

# WIP

rm -rf *.o *.ali

gnatmake -o xabina main.adb


+ 45
- 0
magic.adb 파일 보기

@@ -0,0 +1,45 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body magic is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.magic, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

end magic;

+ 5
- 0
magic.ads 파일 보기

@@ -52,4 +52,9 @@ package magic is

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

procedure generate;
procedure render;

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

end magic;

+ 45
- 0
monster.adb 파일 보기

@@ -0,0 +1,45 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body monster is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.monster, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

end monster;

+ 5
- 0
monster.ads 파일 보기

@@ -52,4 +52,9 @@ package monster is

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

procedure generate;
procedure render;

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

end monster;

+ 45
- 0
plant.adb 파일 보기

@@ -0,0 +1,45 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core, map;

package body plant is

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

procedure generate is
y : natural := 0;
x : natural := 0;
identifier : natural := 0;
begin
for this in map.mark
loop
y := core.randomize (0, natural (map.height'last));
x := core.randomize (0, natural (map.width'last));
identifier := core.randomize (0, natural (list'size));
map.variable_data (this) := (integer (y), integer (x), core.plant, identifier);
end loop;
end generate;

procedure render is
symbol : character := ' ';
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for this in map.mark
loop
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
end loop;
end render;

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

end plant;

+ 5
- 0
plant.ads 파일 보기

@@ -55,4 +55,9 @@ package plant is

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

procedure generate;
procedure render;

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

end plant;

불러오는 중...
취소
저장