CARDS.DLL loader for SDL
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.

cards.h 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Copyright (C) 2019 C. McEnroe <june@causal.agency>
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU Affero General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU Affero General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU Affero General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #ifndef CARDS_H
  17. #define CARDS_H
  18. #include <stddef.h>
  19. #include <stdint.h>
  20. enum Cards {
  21. CardsClub = 0x00,
  22. CardsDiamond = 0x0D,
  23. CardsHeart = 0x1A,
  24. CardsSpade = 0x27,
  25. CardsA = 1,
  26. Cards2, Cards3, Cards4, Cards5, Cards6, Cards7, Cards8, Cards9, Cards10,
  27. CardsJ, CardsQ, CardsK,
  28. CardsEmpty = 0x35,
  29. CardsBack1, CardsBack2, CardsBack3, CardsBack4, CardsBack5, CardsBack6,
  30. CardsBack7, CardsBack8, CardsBack9, CardsBack10, CardsBack11, CardsBack12,
  31. CardsX = 0x43,
  32. CardsO,
  33. CardsLen,
  34. };
  35. struct CardsData {
  36. uint8_t *ptr;
  37. size_t len;
  38. } cardsData[CardsLen];
  39. int cardsLoad(const uint8_t *ptr, size_t len);
  40. #endif