OSDN Git Service

[CONFIG][OpenGL] Fix not effective config for renderer.
[csp-qt/common_source_project-fm7.git] / source / src / common.h
index 2a4063c..74f77f4 100644 (file)
                #endif
        #endif
 #endif
-#ifdef _USE_OT
-                       #define USE_ZLIB
-#endif
-
 // check environemnt/language
 #ifdef _WIN32
        #ifdef _MSC_VER
@@ -976,13 +972,22 @@ uint16_t DLL_PREFIX EndianFromBig_WORD(uint16_t x);
        uint8_t DLL_PREFIX A_OF_COLOR(scrntype_t c);
 #elif defined(_RGB888)
        typedef uint32_t scrntype_t;
-       #define RGB_COLOR(r, g, b)      (((uint32_t)(r) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 0))
+#if defined(__LITTLE_ENDIAN__)
+       #define RGB_COLOR(r, g, b)      (((uint32_t)(b) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(r) << 0) | (0xff << 24))
+       #define RGBA_COLOR(r, g, b, a)  (((uint32_t)(b) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(r) << 0) | ((uint32_t)(a) << 24))
+       #define R_OF_COLOR(c)           (((c)      ) & 0xff)
+       #define G_OF_COLOR(c)           (((c) >>  8) & 0xff)
+       #define B_OF_COLOR(c)           (((c) >> 16) & 0xff)
+       #define A_OF_COLOR(c)           (((c) >> 24) & 0xff)
+#else
+       #define RGB_COLOR(r, g, b)      (((uint32_t)(r) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 0) | (0xff << 24))
        #define RGBA_COLOR(r, g, b, a)  (((uint32_t)(r) << 16) | ((uint32_t)(g) << 8) | ((uint32_t)(b) << 0) | ((uint32_t)(a) << 24))
        #define R_OF_COLOR(c)           (((c) >> 16) & 0xff)
        #define G_OF_COLOR(c)           (((c) >>  8) & 0xff)
        #define B_OF_COLOR(c)           (((c)      ) & 0xff)
        #define A_OF_COLOR(c)           (((c) >> 24) & 0xff)
 #endif
+#endif
 
 inline uint64_t ExchangeEndianU64(uint64_t __in)
 {
@@ -1102,12 +1107,11 @@ bool DLL_PREFIX load_wav_to_monoral(void *__fio, int16_t **buffer, uint32_t *rat
 
 // file path
 const _TCHAR *DLL_PREFIX get_application_path();
+const _TCHAR *DLL_PREFIX get_initial_current_path();
 const _TCHAR *DLL_PREFIX create_local_path(const _TCHAR *format, ...);
 void DLL_PREFIX create_local_path(_TCHAR *file_path, int length, const _TCHAR *format, ...);
 const _TCHAR *DLL_PREFIX create_date_file_path(const _TCHAR *extension);
 bool DLL_PREFIX is_absolute_path(const _TCHAR *file_path);
-const _TCHAR *DLL_PREFIX create_absolute_path(const _TCHAR *file_name);
-void DLL_PREFIX create_absolute_path(_TCHAR *file_path, int length, const _TCHAR *file_name);
 void DLL_PREFIX create_date_file_path(_TCHAR *file_path, int length, const _TCHAR *extension);
 bool DLL_PREFIX check_file_extension(const _TCHAR *file_path, const _TCHAR *ext);
 const _TCHAR *DLL_PREFIX get_file_path_without_extensiton(const _TCHAR *file_path);
@@ -1125,6 +1129,8 @@ const wchar_t *DLL_PREFIX tchar_to_wchar(const _TCHAR *ts);
 
 
 // misc
+void DLL_PREFIX common_initialize();
+
 int32_t DLL_PREFIX muldiv_s32(int32_t nNumber, int32_t nNumerator, int32_t nDenominator);
 uint32_t DLL_PREFIX muldiv_u32(uint32_t nNumber, uint32_t nNumerator, uint32_t nDenominator);
 
@@ -1164,6 +1170,7 @@ typedef DLL_PREFIX struct cur_time_s {
 } cur_time_t;
 
 void DLL_PREFIX get_host_time(cur_time_t* cur_time);
+const _TCHAR DLL_PREFIX *get_lib_common_version();
 
 // symbol
 typedef struct symbol_s {