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...
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

39 linhas
1.9KB

  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 body action is
  11. ------------------------------------------------------------------------------------------
  12. procedure scan is
  13. begin
  14. ada.text_io.get_immediate (signal);
  15. end scan;
  16. procedure bind (symbol : character := core.cancel;
  17. mimimi : procedure_pointer := game_idle'access) is
  18. begin
  19. list (character'pos (symbol)) := mimimi;
  20. end bind;
  21. procedure unbind (symbol : character := core.cancel) is
  22. begin
  23. list (character'pos (symbol)) := game_idle'access;
  24. end unbind;
  25. procedure game_idle is begin null; end game_idle;
  26. procedure game_exit is begin active := false; end game_exit;
  27. ------------------------------------------------------------------------------------------
  28. end action;