game.ddh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #(include "intro.ddh")
  2. (include "player.ddh")
  3. (include "overlayButtons.ddh")
  4. #
  5. # defines actions supported by the game
  6. #
  7. #
  8. # move rose to player X (DONE)
  9. #
  10. # player X draw 1 card (DONE)
  11. #
  12. # player X has to select a card (DONE)
  13. #
  14. # reveal player X's selected card (DONE)
  15. #
  16. # discard player X's selected card (DONE)
  17. #
  18. # look at player X's card
  19. #
  20. # be given choices (?)
  21. #
  22. (class GameAction dd_matrix
  23. (group
  24. (def int actionType)
  25. (def int playerIndex)
  26. (def int value)
  27. (def int delay)
  28. (function void set (group int actionType int playerIndex int valueAmount int delay))
  29. )
  30. )
  31. # game world
  32. (class world_game dd_world
  33. (group
  34. # gameover animation
  35. (def int victoriousPlayer)
  36. # overlay buttons
  37. (def OverlayButtons ovButtons)
  38. # arrow shader
  39. (def avdl_program arrowProgramAvdl)
  40. (def float arrowActiveCol[3])
  41. (def float arrowInactiveCol[3])
  42. (def float arrowCurrentCol[3])
  43. # game phases
  44. (def ref char phaseText)
  45. (def int lookingAtChoosenAction)
  46. (def int confirmChoosenAction)
  47. (def int phase)
  48. # game actions
  49. (def int lastSelectedCardPlayerIndex)
  50. (def int lastSelectedCardIndex)
  51. (def GameAction actions[100])
  52. (def int actionsTotal)
  53. (def GameAction injectActions[100])
  54. (def int injectActionsTotal)
  55. # font
  56. (def dd_string3d font)
  57. # card font
  58. (def dd_string3d cardFont)
  59. # camera control
  60. (def float rotX)
  61. (def float rotY)
  62. (def float targetRotX)
  63. (def float targetRotY)
  64. (def float holdRotX)
  65. (def float holdRotY)
  66. (def int isRotating)
  67. # rose player
  68. (def dd_meshTexture roseCardMesh)
  69. (def int rosePlayer)
  70. (def Card roseCard)
  71. (def int isRoseFlat)
  72. # looking at
  73. (def dd_meshColour lookat)
  74. # center of world
  75. (def dd_matrix matCenter)
  76. # stage
  77. (def dd_meshColour stage)
  78. (def dd_meshColour table)
  79. (def dd_meshColour tableArrow)
  80. (def dd_meshColour tableArrowDecoration)
  81. (def float arrowRotation)
  82. (def float arrowRotationTarget)
  83. # card meshes
  84. (def dd_meshTexture cardBack)
  85. (def dd_meshTexture cardFront[10])
  86. # cards
  87. (def int cardsTotal)
  88. (def Card cards[48])
  89. # tutorial cards
  90. (def int guide)
  91. (def int tutCardsTotal)
  92. (def Card tutCards[20])
  93. # deck
  94. (def dd_matrix deckMatrix)
  95. (def ref Card deck[48])
  96. (def int deckTotal)
  97. # discard
  98. (def dd_matrix discardMatrix)
  99. (def ref Card discard[48])
  100. (def int discardTotal)
  101. # players
  102. (def int startingPlayer)
  103. (def Player player[10])
  104. (def int playersTotal)
  105. (def float rotating)
  106. (function void create (group))
  107. (function void onload (group))
  108. #(function void resize (group))
  109. (function void update (group))
  110. (function void draw (group))
  111. (function void key_input (group char key))
  112. (function void mouse_input (group int button int type))
  113. (function void clean (group))
  114. (function void drawCard (group int playerIndex))
  115. (function void addToDiscard (group Card card))
  116. (function void addToDeck (group Card card))
  117. (function void setRosePlayer (group int playerId))
  118. (function void shuffleDeck (group))
  119. (function void applyArrowRotation (group int playerIndex))
  120. (function void applyChooseCard (group int optionIndedx))
  121. # action functions
  122. (function void addAction (group int actionType int playerIndex int valueAmount int delay))
  123. (function void removeAction (group))
  124. (function void addInjectAction (group int actionType int playerIndex int valueAmount int delay))
  125. (function void injectActionsToActions (group))
  126. (function void grabRose (group))
  127. )
  128. ) # game world