Board game like Abalone for AmigaOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BoardClass.hpp 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * This file is part of Abacus.
  3. * Copyright (C) 1997 Kai Nickel
  4. *
  5. * Abacus is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * Abacus is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Abacus. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #ifndef INCLUDE_BOARDCLASS_HPP
  20. #define INCLUDE_BOARDCLASS_HPP
  21. /****************************************************************************************
  22. BoardClass.hpp
  23. -----------------------------------------------------------------------------------------
  24. CL_BoardClass (Area)
  25. -----------------------------------------------------------------------------------------
  26. 02.01.1997
  27. ****************************************************************************************/
  28. #include "System.hpp"
  29. #include "MCC.hpp"
  30. #include "Board.hpp"
  31. #include "Tools.hpp"
  32. extern MUI_CustomClass *CL_Board;
  33. #define MUIA_Board_Board (TAGBASE_KAI | 0x1201) // [.S.]
  34. #define MUIM_Board_NewSettings (TAGBASE_KAI | 0x1202)
  35. #define MUIM_Board_Undo (TAGBASE_KAI | 0x1204)
  36. #define MUIM_Board_Winner (TAGBASE_KAI | 0x1205)
  37. #define MUIM_Board_Load (TAGBASE_KAI | 0x1206)
  38. #define MUIM_Board_Save (TAGBASE_KAI | 0x1207)
  39. #define MUIM_Board_NewGame (TAGBASE_KAI | 0x1208)
  40. #define MUIM_Board_ComputerMove (TAGBASE_KAI | 0x1209)
  41. struct Board_Data
  42. {
  43. Board board, last_board; // Spielfeld und letztes
  44. int update_mode; //
  45. BOOL setsels; // Selections setzen od. löschen
  46. int ball[3]; // Selektierte Bälle
  47. BOOL diff; // Zeichnen im Vgl. zum last_board;
  48. BOOL newsettings;
  49. void GetCenterOf(int, int&, int&); // Kreismittelpunkt von feld[nr] berechnen
  50. int GetNrOf (int, int); // Feldindex der Mausposition berechnen
  51. ULONG ActivePlayerNr(); // Akt. Spieler als Nummer
  52. /*
  53. ** Graphik Context
  54. */
  55. LONG pen1, pen2, pen3, pen4;
  56. int dx, dy, rx, ry, mdx, mdy, mrx, mry,
  57. left, right, top, bottom,
  58. width, height;
  59. WORD areabuffer[1000];
  60. BOOL dirs; // Mögl. Züge anzeigen
  61. };
  62. SAVEDS ASM ULONG Board_Dispatcher(REG(a0) struct IClass* cl,
  63. REG(a2) Object* obj,
  64. REG(a1) Msg msg);
  65. #endif