WWPalette.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef _WWPalette_h_INCLUDED_
  2. #define _WWPalette_h_INCLUDED_
  3. /*****************************************************************************/
  4. /* ここから */
  5. /*****************************************************************************/
  6. /*****************************************************************************/
  7. /* クラスの定義 */
  8. /*****************************************************************************/
  9. typedef struct _WWPalette * WWPalette;
  10. /*****************************************************************************/
  11. /* ヘッダファイルのインクルード */
  12. /*****************************************************************************/
  13. #include <stdio.h>
  14. #include <stdlib.h>
  15. #include "WWDisplay.h"
  16. /*****************************************************************************/
  17. /* メンバ関数の宣言 */
  18. /*****************************************************************************/
  19. int WWPalette_GetNumber(WWPalette p);
  20. int WWPalette_SetNumber(WWPalette p, int n);
  21. /*
  22. * WonX-2.0 以降から,透明色の判定は WWDisplay で行うように変更したので,
  23. * WWPalette で透明色を管理する必要は無くなった.一応コードを残しておく.
  24. */
  25. #if 0
  26. int WWPalette_GetTransparent(WWPalette palette);
  27. int WWPalette_SetTransparent(WWPalette palette, int f);
  28. #endif
  29. int WWPalette_GetRed( WWPalette p, int n);
  30. int WWPalette_GetGreen(WWPalette p, int n);
  31. int WWPalette_GetBlue( WWPalette p, int n);
  32. int WWPalette_SetRed( WWPalette p, int n, int value);
  33. int WWPalette_SetGreen(WWPalette p, int n, int value);
  34. int WWPalette_SetBlue( WWPalette p, int n, int value);
  35. /*
  36. * WonX-2.0 以降から,透明色の判定は WWDisplay で行うように変更したので,
  37. * WWPalette で透明色を管理する必要は無くなった.一応コードを残しておく.
  38. */
  39. #if 1
  40. WWPalette WWPalette_Create(int number, int * mapped_colors);
  41. #else
  42. WWPalette WWPalette_Create(int number, int * mapped_colors, int transparent);
  43. #endif
  44. WWPalette WWPalette_Destroy(WWPalette palette);
  45. int * WWPalette_GetMappedColors(WWPalette palette, int * mapped_colors);
  46. int WWPalette_SetMappedColors(WWPalette palette, int * mapped_colors);
  47. int WWPalette_GetMappedColor(WWPalette palette, int color);
  48. int WWPalette_SetMappedColor(WWPalette palette, int color, int mapped_color);
  49. int WWPalette_PrintData(WWPalette p, WWDisplay display, FILE * f);
  50. /*****************************************************************************/
  51. /* ここまで */
  52. /*****************************************************************************/
  53. #endif
  54. /*****************************************************************************/
  55. /* End of File. */
  56. /*****************************************************************************/