EtcConfig.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2015 The Etc2Comp Authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #pragma once
  17. #ifdef _WIN32
  18. #define ETC_WINDOWS (1)
  19. #else
  20. #define ETC_WINDOWS (0)
  21. #endif
  22. #if __APPLE__
  23. #define ETC_OSX (1)
  24. #else
  25. #define ETC_OSX (0)
  26. #endif
  27. #if __unix__
  28. #define ETC_UNIX (1)
  29. #else
  30. #define ETC_UNIX (0)
  31. #endif
  32. // short names for common types
  33. #include <stdint.h>
  34. typedef int8_t i8;
  35. typedef int16_t i16;
  36. typedef int32_t i32;
  37. typedef int64_t i64;
  38. typedef uint8_t u8;
  39. typedef uint16_t u16;
  40. typedef uint32_t u32;
  41. typedef uint64_t u64;
  42. typedef float f32;
  43. typedef double f64;
  44. // Keep asserts enabled in release builds during development
  45. #undef NDEBUG
  46. // 0=disable. stb_image can be used if you need to compress
  47. //other image formats like jpg
  48. #define USE_STB_IMAGE_LOAD 0
  49. #if ETC_WINDOWS
  50. #include <sdkddkver.h>
  51. #define _CRT_SECURE_NO_WARNINGS (1)
  52. #include <tchar.h>
  53. #endif
  54. #include <stdio.h>