Move type defines into core library... all modules should have a standard set of types.

This commit is contained in:
Pavel Krajcevski 2012-08-30 13:28:28 -04:00
parent 1a0c3365da
commit 2ad2e94584
9 changed files with 32 additions and 16 deletions

View file

@ -1,3 +1,5 @@
INCLUDE_DIRECTORIES(${TexC_SOURCE_DIR}/Core/include)
INCLUDE_DIRECTORIES(${TexC_SOURCE_DIR}/BPTCEncoder/include) INCLUDE_DIRECTORIES(${TexC_SOURCE_DIR}/BPTCEncoder/include)
INCLUDE_DIRECTORIES(${TexC_BINARY_DIR}/BPTCEncoder/include) INCLUDE_DIRECTORIES(${TexC_BINARY_DIR}/BPTCEncoder/include)
@ -107,7 +109,6 @@ CONFIGURE_FILE(
SET( HEADERS SET( HEADERS
src/BC7CompressionMode.h src/BC7CompressionMode.h
src/BC7IntTypes.h
src/BitStream.h src/BitStream.h
src/RGBAEndpoints.h src/RGBAEndpoints.h
) )

View file

@ -18,7 +18,7 @@
#ifndef __BC7_COMPRESSIONMODE_H__ #ifndef __BC7_COMPRESSIONMODE_H__
#define __BC7_COMPRESSIONMODE_H__ #define __BC7_COMPRESSIONMODE_H__
#include "BC7IntTypes.h" #include "TexCompTypes.h"
#include "RGBAEndpointsSIMD.h" #include "RGBAEndpointsSIMD.h"
// Forward Declarations // Forward Declarations

View file

@ -15,7 +15,7 @@
// //
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
#include "BC7IntTypes.h" #include "TexCompTypes.h"
#include "BC7Compressor.h" #include "BC7Compressor.h"
#include "BC7CompressionMode.h" #include "BC7CompressionMode.h"
#include "BCLookupTables.h" #include "BCLookupTables.h"

View file

@ -15,7 +15,7 @@
// //
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
#include "BC7IntTypes.h" #include "TexCompTypes.h"
#include "BC7Compressor.h" #include "BC7Compressor.h"
#include "BC7CompressionModeSIMD.h" #include "BC7CompressionModeSIMD.h"
#include "RGBAEndpointsSIMD.h" #include "RGBAEndpointsSIMD.h"

View file

@ -16,7 +16,6 @@
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
#include "BC7Config.h" #include "BC7Config.h"
#include "BC7IntTypes.h"
#include "RGBAEndpoints.h" #include "RGBAEndpoints.h"
#include "BC7Compressor.h" #include "BC7Compressor.h"
#include "BC7CompressionMode.h" #include "BC7CompressionMode.h"

View file

@ -18,7 +18,8 @@
#ifndef __RGBA_ENDPOINTS_H__ #ifndef __RGBA_ENDPOINTS_H__
#define __RGBA_ENDPOINTS_H__ #define __RGBA_ENDPOINTS_H__
#include "BC7IntTypes.h" #include "TexCompTypes.h"
#include <cmath> #include <cmath>
#include <cfloat> #include <cfloat>
#include <cstring> #include <cstring>

View file

@ -18,7 +18,8 @@
#ifndef __RGBA_SIMD_ENDPOINTS_H__ #ifndef __RGBA_SIMD_ENDPOINTS_H__
#define __RGBA_SIMD_ENDPOINTS_H__ #define __RGBA_SIMD_ENDPOINTS_H__
#include "BC7IntTypes.h" #include "TexCompTypes.h"
#include <cmath> #include <cmath>
#include <cfloat> #include <cfloat>
#include <cstring> #include <cstring>

View file

@ -1,4 +1,3 @@
// Copyright 2012 (c) Pavel Krajcevski // Copyright 2012 (c) Pavel Krajcevski
// BC7IntTypes.h // BC7IntTypes.h
@ -6,9 +5,12 @@
// on various platforms. // on various platforms.
// !FIXME! Still needs to be tested on Windows platforms. // !FIXME! Still needs to be tested on Windows platforms.
#ifndef _TEX_COMP_TYPES_H_
#define _TEX_COMP_TYPES_H_
// Windows?
#ifdef _MSC_VER #ifdef _MSC_VER
typedef __int16 int16; typedef __int16 int16;
typedef __uint16 uint16; typedef __uint16 uint16;
typedef __int32 int32; typedef __int32 int32;
@ -16,6 +18,12 @@ typedef __uint32 uint32;
typedef __int8 int8; typedef __int8 int8;
typedef __uint8 uint8; typedef __uint8 uint8;
typedef __uint64 uint64;
typedef __int64 int64;
typedef __int32_ptr int32_ptr;
// If not, assume GCC, or at least standard defines...
#else #else
#include <stdint.h> #include <stdint.h>
@ -23,9 +31,15 @@ typedef __uint8 uint8;
typedef int8_t int8; typedef int8_t int8;
typedef int16_t int16; typedef int16_t int16;
typedef int32_t int32; typedef int32_t int32;
typedef int64_t int64;
typedef uint8_t uint8; typedef uint8_t uint8;
typedef uint16_t uint16; typedef uint16_t uint16;
typedef uint32_t uint32; typedef uint32_t uint32;
typedef uint64_t uint64;
#endif typedef uintptr_t int32_ptr;
#endif // _MSC_VER
#endif // _TEX_COMP_TYPES_H_

View file

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "Windows.h" #include "TexCompTypes.h"
// A simple stopwatch class using Windows' high-resolution performance counters. // A simple stopwatch class using Windows' high-resolution performance counters.
class StopWatch class StopWatch
@ -34,8 +34,8 @@ public:
double TimeInMicroseconds() const; double TimeInMicroseconds() const;
private: private:
LONGLONG frequency; uint64 frequency;
LONGLONG start; uint64 start;
LONGLONG stop; uint64 stop;
DWORD_PTR affinityMask; int32_ptr affinityMask;
}; };