Experimental minimal terminal rogue-like game in Ada programming language. I used to write a lot of Ada programs some time ago, then went in full C and assembly mode, and came back to Ada...
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

44 rindas
2.1KB

  1. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2. -- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
  3. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  4. -- 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
  5. -- 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
  6. -- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  7. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  8. with ada.text_io;
  9. with core;
  10. package action is
  11. ------------------------------------------------------------------------------------------
  12. procedure game_idle;
  13. type procedure_pointer is access procedure;
  14. type mememe is mod (2 ** 8);
  15. type list_type is array (mememe) of procedure_pointer;
  16. ------------------------------------------------------------------------------------------
  17. active : boolean := true;
  18. signal : character := ' ';
  19. list : list_type := (others => game_idle'access);
  20. ------------------------------------------------------------------------------------------
  21. procedure scan;
  22. procedure bind (symbol : character := core.cancel;
  23. mimimi : procedure_pointer := game_idle'access);
  24. procedure unbind (symbol : character := core.cancel);
  25. procedure game_exit;
  26. ------------------------------------------------------------------------------------------
  27. end action;