colour.h 1.0 KB

1234567891011121314151617181920212223
  1. /*
  2. * Voxel-a-tord
  3. * colour.h:
  4. * Copyright (c) 2021-2022 986-Studio. All rights reserved.
  5. *
  6. * Created by Manoël Trapier on 15/03/2021.
  7. */
  8. #ifndef VOXELATOR_SOURCE_INCLUDE_COLOUR_H
  9. #define VOXELATOR_SOURCE_INCLUDE_COLOUR_H
  10. /***********************************************************************************************************************
  11. * Data types
  12. **********************************************************************************************************************/
  13. typedef uint32_t colour_t;
  14. /***********************************************************************************************************************
  15. * Prototypes
  16. **********************************************************************************************************************/
  17. #define MAKE_RGB(_r, _g, _b) ((0xFF000000) | ((_b & 0xFF) << 16) | ((_g & 0xFF) << 8) | ((_r & 0xFF)))
  18. #define MAKE_ARGB(_a, _r, _g, _b) (((_a & 0xFF) << 24) | ((_g & 0xFF) << 16) | ((_g & 0xFF) << 8) | ((_r & 0xFF)))
  19. #endif /* VOXELATOR_SOURCE_INCLUDE_COLOUR_H */