mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Link GLideN64 with GLideNHQ library.
This commit is contained in:
parent
82198c148a
commit
e38c750ea7
|
@ -38,6 +38,9 @@ set(GLideN64_SOURCES
|
|||
common/CommonAPIImpl_common.cpp
|
||||
)
|
||||
|
||||
include_directories( GLideNHQ )
|
||||
LINK_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/GLideNHQ/build )
|
||||
|
||||
if(MUPENPLUSAPI)
|
||||
add_definitions(
|
||||
-DMUPENPLUSAPI
|
||||
|
@ -169,4 +172,4 @@ SET_TARGET_PROPERTIES(
|
|||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plugin
|
||||
)
|
||||
|
||||
target_link_libraries(GLideN64 ${OPENGL_LIBRARIES} ${SDL_LIBRARIES})
|
||||
target_link_libraries(GLideN64 ${OPENGL_LIBRARIES} ${SDL_LIBRARIES} GLideNHQ )
|
||||
|
|
|
@ -126,13 +126,14 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>GLideNHQ\build_vs\Debug\libGLideNHQ.lib;opengl32.lib;glu32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>c:\Games\N64\Plugin\GLideN64.dll</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)New glNintendo64().pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)New glNintendo64().lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>%BOOST_ROOT%/lib32-msvc-12.0</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">
|
||||
|
@ -152,13 +153,14 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glu32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>GLideNHQ\build_vs\Debug\libGLideNHQ.lib;opengl32.lib;glu32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>c:\Games\N64\M64Py\mupen64plus-video-GLideN64.dll </OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)New glNintendo64().pdb</ProgramDatabaseFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)New glNintendo64().lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>%BOOST_ROOT%/lib32-msvc-12.0</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -180,7 +182,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>GLideNHQ\build_vs\Release\libGLideNHQ.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>c:\Games\N64\Plugin\GLideN64.dll</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -188,6 +190,7 @@
|
|||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(OutDir)New glNintendo64().lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>%BOOST_ROOT%/lib32-msvc-12.0</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_mupenplus|Win32'">
|
||||
|
@ -210,7 +213,7 @@
|
|||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>GLideNHQ\build_vs\Release\libGLideNHQ.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>c:\Games\N64\M64Py\mupen64plus-video-GLideN64.dll</OutputFile>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -218,6 +221,7 @@
|
|||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>$(OutDir)New glNintendo64().lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>%BOOST_ROOT%/lib32-msvc-12.0</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug 1964|Win32'">
|
||||
|
@ -240,6 +244,7 @@
|
|||
<SubSystem>Windows</SubSystem>
|
||||
<ImportLibrary>$(OutDir)New glNintendo64().lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<AdditionalLibraryDirectories>%BOOST_ROOT%/lib32-msvc-12.0</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
@ -353,6 +358,7 @@
|
|||
<ClInclude Include="gDP.h" />
|
||||
<ClInclude Include="glext.h" />
|
||||
<ClInclude Include="GLideN64.h" />
|
||||
<ClInclude Include="GLideNHQ\Ext_TxFilter.h" />
|
||||
<ClInclude Include="gSP.h" />
|
||||
<ClInclude Include="Log.h" />
|
||||
<ClInclude Include="mupenplus\GLideN64_mupenplus.h">
|
||||
|
|
|
@ -326,6 +326,9 @@
|
|||
<ClInclude Include="F3DSWSE.h">
|
||||
<Filter>Header Files\uCodes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GLideNHQ\Ext_TxFilter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Resource.rc">
|
||||
|
|
|
@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 2.6)
|
|||
project( GLideNHQ )
|
||||
|
||||
set(GLideNHQ_SOURCES
|
||||
Ext_TxFilter.cpp
|
||||
TextureFilters.cpp
|
||||
TextureFilters_2xsai.cpp
|
||||
TextureFilters_hq2x.cpp
|
||||
|
@ -27,12 +26,12 @@ set(Boost_USE_MULTITHREADED ON)
|
|||
find_package(Boost COMPONENTS thread filesystem system REQUIRED)
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
|
||||
add_definitions( -DTXFILTER_DLL )
|
||||
LINK_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/lib )
|
||||
|
||||
if(WIN32)
|
||||
LINK_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/lib )
|
||||
add_definitions(
|
||||
-DWIN32
|
||||
-DOS_WINDOWS
|
||||
-D_CRT_SECURE_NO_WARNINGS
|
||||
)
|
||||
endif(WIN32)
|
||||
|
@ -69,10 +68,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
|||
endif()
|
||||
|
||||
if( NOT GHQCHK )
|
||||
add_library( GLideNHQ STATIC ${GLideNHQ_SOURCES})
|
||||
add_library( libGLideNHQ STATIC ${GLideNHQ_SOURCES})
|
||||
|
||||
SET_TARGET_PROPERTIES(
|
||||
GLideNHQ
|
||||
libGLideNHQ
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX # Or else we get an error message, because cmake can't figure out from the ".o"-suffix that it is a C-linker we need.
|
||||
PREFIX ""
|
||||
|
@ -80,11 +79,11 @@ if( NOT GHQCHK )
|
|||
)
|
||||
|
||||
if( CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
target_link_libraries(GLideNHQ ${OPENGL_LIBRARIES} ${Boost_LIBRARIES} libpng zlib dxtn )
|
||||
target_link_libraries(libGLideNHQ ${OPENGL_LIBRARIES} ${Boost_LIBRARIES} png z dxtn )
|
||||
endif( CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
|
||||
if( CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
target_link_libraries(GLideNHQ ${OPENGL_LIBRARIES} ${Boost_LIBRARIES} libpng zlib dxtn )
|
||||
target_link_libraries(libGLideNHQ ${OPENGL_LIBRARIES} ${Boost_LIBRARIES} png z dxtn )
|
||||
endif( CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
else( NOT GHQCHK )
|
||||
add_definitions(-DGHQCHK)
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#ifndef __EXT_TXFILTER_H__
|
||||
#define __EXT_TXFILTER_H__
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef OS_WINDOWS
|
||||
#include <windows.h>
|
||||
#define TXHMODULE HMODULE
|
||||
#define DLOPEN(a) LoadLibraryW(a)
|
||||
|
@ -157,7 +157,17 @@ struct GHQTexInfo {
|
|||
#define INFO_BUF 4095
|
||||
typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
|
||||
|
||||
#ifndef TXFILTER_DLL
|
||||
/* dll exports */
|
||||
/* Use TXFilter as a library. Define exported functions. */
|
||||
#ifdef TXFILTER_LIB
|
||||
#define TAPI __declspec(dllexport)
|
||||
#define TAPIENTRY
|
||||
#else
|
||||
#define TAPI
|
||||
#define TAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef TXFILTER_DLL
|
||||
boolean ext_ghq_init(int maxwidth, /* maximum texture width supported by hardware */
|
||||
int maxheight,/* maximum texture height supported by hardware */
|
||||
int maxbpp, /* maximum texture bpp supported by hardware */
|
||||
|
@ -202,6 +212,45 @@ boolean ext_ghq_dmptx(unsigned char *src, /* input texture (must be in 3Dfx Gl
|
|||
);
|
||||
|
||||
boolean ext_ghq_reloadhirestex();
|
||||
|
||||
#else
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned long uint32;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize,
|
||||
wchar_t *path, wchar_t*ident,
|
||||
dispInfoFuncExt callback);
|
||||
|
||||
TAPI void TAPIENTRY
|
||||
txfilter_shutdown(void);
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter(uint8 *src, int srcwidth, int srcheight, uint16 srcformat,
|
||||
uint64 g64crc, GHQTexInfo *info);
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_hirestex(uint64 g64crc, uint64 r_crc64, uint16 *palette, GHQTexInfo *info);
|
||||
|
||||
TAPI uint64 TAPIENTRY
|
||||
txfilter_checksum(uint8 *src, int width, int height, int size, int rowStride, uint8 *palette);
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_dmptx(uint8 *src, int width, int height, int rowStridePixel, uint16 gfmt, uint16 n64fmt, uint64 r_crc64);
|
||||
|
||||
TAPI boolean TAPIENTRY
|
||||
txfilter_reloadhirestex();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* TXFILTER_DLL */
|
||||
|
||||
#endif /* __EXT_TXFILTER_H__ */
|
||||
|
|
|
@ -26,19 +26,6 @@
|
|||
|
||||
#include "Ext_TxFilter.h"
|
||||
|
||||
/* dll exports */
|
||||
#ifdef TXFILTER_DLL
|
||||
#define TAPI __declspec(dllexport)
|
||||
#define TAPIENTRY
|
||||
#else
|
||||
#define TAPI
|
||||
#define TAPIENTRY
|
||||
#endif
|
||||
|
||||
typedef unsigned char uint8;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned long uint32;
|
||||
|
||||
#ifdef WIN32
|
||||
#define KBHIT(key) ((GetAsyncKeyState(key) & 0x8001) == 0x8001)
|
||||
#else
|
||||
|
|
|
@ -18,8 +18,15 @@ endif( CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||
|
||||
add_definitions(
|
||||
-DGHQCHK=1
|
||||
-DTXFILTER_DLL=1
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(
|
||||
-DWIN32
|
||||
-DOS_WINDOWS
|
||||
)
|
||||
endif(WIN32)
|
||||
|
||||
#SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_CPP11_COMPILE_FLAGS}" )
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user