COLCODE.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Seven Kingdoms: Ancient Adversaries
  3. *
  4. * Copyright 1997,1998 Enlight Software Ltd.
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. *
  19. */
  20. // Filename : COLCODE.H
  21. // Description : C include file for defining special color
  22. // see/update also COLCODE.INC for assembly
  23. // for transparent code repeated for 1 to UNIQUE_REPEAT_CODE_NUM times,
  24. // write FEW_TRANSPARENT_CODE(repeated_times)
  25. // for transparent code repeated for UNIQUE_REPEAT_CODE_NUM+1 to 255 times,
  26. // write two bytes, MANY_TRANSPARENT_CODE and repeated_times
  27. #define TRANSPARENT_CODE 255
  28. #define UNIQUE_REPEAT_CODE_NUM 7 // total no. of bytes used by transparent pixels and compressed transparent pixels is 7+1 (the last 1 is the first byte of the 2 bytes compression code)
  29. #define FEW_TRANSPARENT_CODE(n) (0xFF-n+1)
  30. #define MANY_TRANSPARENT_CODE 0xf8
  31. #define MIN_TRANSPARENT_CODE 0xf8
  32. #define MAX_TRANSPARENT_CODE 0xff
  33. #define SHADOW_CODE 0x00
  34. #define OUTLINE_CODE 0xf2
  35. #define OUTLINE_SHADOW_CODE 0xf3