Some image fixups.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5551 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2019-09-29 02:16:34 +00:00
parent 4134353778
commit be5466c9fd
7 changed files with 573 additions and 465 deletions

View file

@ -57,10 +57,13 @@ SET(FTE_BUILD_CONFIG ${CMAKE_HOME_DIRECTORY}/engine/common/config_fteqw.h CACHE
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};CONFIG_FILE_NAME=${FTE_BUILD_CONFIG}) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};CONFIG_FILE_NAME=${FTE_BUILD_CONFIG})
FIND_PACKAGE(ZLIB) FIND_PACKAGE(ZLIB)
IF(NOT ZLIB_FOUND) IF(ZLIB_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};ZLIB_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES})
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES})
ELSE()
MESSAGE(WARNING "libz library NOT available. compressed pk3 will not be available.") MESSAGE(WARNING "libz library NOT available. compressed pk3 will not be available.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_ZLIB) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_ZLIB)
SET(ZLIB_LIBRARY )
SET(ZLIB_LIBRARIES ) SET(ZLIB_LIBRARIES )
ENDIF() ENDIF()
@ -84,13 +87,19 @@ ELSE()
ENDIF() ENDIF()
FIND_PACKAGE(JPEG) FIND_PACKAGE(JPEG)
IF(NOT JPEG_FOUND) IF(JPEG_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBJPEG_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${JPEG_LIBRARIES})
ELSE()
MESSAGE(WARNING "libjpeg library NOT available. Who cares?") MESSAGE(WARNING "libjpeg library NOT available. Who cares?")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_JPEG) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_JPEG)
ENDIF() ENDIF()
FIND_PACKAGE(PNG) FIND_PACKAGE(PNG)
IF(NOT PNG_FOUND) IF(PNG_FOUND)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBPNG_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${PNG_LIBRARIES})
ELSE()
MESSAGE(WARNING "libpng library NOT available. Good luck with screenshots.") MESSAGE(WARNING "libpng library NOT available. Good luck with screenshots.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_PNG) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_PNG)
ENDIF() ENDIF()
@ -98,6 +107,8 @@ ENDIF()
FIND_PACKAGE(Freetype) FIND_PACKAGE(Freetype)
IF(FREETYPE_FOUND) IF(FREETYPE_FOUND)
INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} )
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBFREETYPE_STATIC)
SET(FTE_LIBS ${FTE_LIBS} ${FREETYPE_LIBRARIES})
ELSE() ELSE()
MESSAGE(WARNING "freetype library NOT available. I hope you're okay with ascii.") MESSAGE(WARNING "freetype library NOT available. I hope you're okay with ascii.")
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_FREETYPE) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_FREETYPE)
@ -155,8 +166,8 @@ IF(${ANDROID})
# INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} ) # INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIRS} )
SET(FTE_DEFINES ${FTE_DEFINES};ANDROID;VKQUAKE;DYNAMIC_LIBPNG;DYNAMIC_LIBJPEG;MULTITHREAD) SET(FTE_DEFINES ${FTE_DEFINES};ANDROID;VKQUAKE;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} android log EGL ${ZLIB_LIBRARIES} m ${CMAKE_DL_LIBS}) SET(FTE_LIBS ${FTE_LIBS} android log EGL m ${CMAKE_DL_LIBS})
SET(FTE_ARCH_FILES SET(FTE_ARCH_FILES
engine/client/sys_droid.c engine/client/sys_droid.c
engine/common/sys_linux_threads.c engine/common/sys_linux_threads.c
@ -170,8 +181,8 @@ ELSEIF(${WIN32})
# engine/server/sv_sys_win.c # engine/server/sv_sys_win.c
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES} ole32 gdi32 wsock32 winmm dxguid) SET(FTE_LIBS ${FTE_LIBS} ole32 gdi32 wsock32 winmm dxguid)
SET(FTE_DEFINES ${FTE_DEFINES};D3D9QUAKE;D3D11QUAKE;DYNAMIC_LIBPNG;DYNAMIC_LIBJPEG) SET(FTE_DEFINES ${FTE_DEFINES};D3D9QUAKE;D3D11QUAKE)
SET(FTE_ARCH_FILES SET(FTE_ARCH_FILES
engine/client/winquake.rc engine/client/winquake.rc
engine/common/sys_win_threads.c engine/common/sys_win_threads.c
@ -201,7 +212,7 @@ ELSEIF(${WIN32})
engine/d3d/vid_d3d8.c engine/d3d/vid_d3d8.c
) )
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES} wsock32 winmm) SET(FTESV_LIBS ${FTESV_LIBS} wsock32 winmm)
SET(FTESV_ARCH_FILES SET(FTESV_ARCH_FILES
engine/client/winquake.rc engine/client/winquake.rc
engine/common/sys_win_threads.c engine/common/sys_win_threads.c
@ -236,8 +247,8 @@ ELSEIF(${UNIX}) #linux(ish)
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11)
ENDIF() ENDIF()
SET(FTE_DEFINES ${FTE_DEFINES};DYNAMIC_LIBPNG;DYNAMIC_LIBJPEG;DYNAMIC_SDL;MULTITHREAD) SET(FTE_DEFINES ${FTE_DEFINES};DYNAMIC_SDL;MULTITHREAD)
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES} m ${CMAKE_DL_LIBS} pthread ${SDL2_LIBRARIES}) SET(FTE_LIBS ${FTE_LIBS} m ${CMAKE_DL_LIBS} pthread ${SDL2_LIBRARIES})
SET(FTE_ARCH_FILES SET(FTE_ARCH_FILES
engine/client/sys_linux.c engine/client/sys_linux.c
engine/common/sys_linux_threads.c engine/common/sys_linux_threads.c
@ -292,7 +303,7 @@ ELSEIF(${UNIX}) #linux(ish)
engine/common/net_ssl_gnutls.c engine/common/net_ssl_gnutls.c
# engine/common/net_ssl_openssl.c # engine/common/net_ssl_openssl.c
) )
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES} m ${CMAKE_DL_LIBS} pthread) SET(FTESV_LIBS ${FTESV_LIBS} m ${CMAKE_DL_LIBS} pthread)
# SET(FTE_DEFINES ${FTE_DEFINES};HAVE_OPENSSL) # SET(FTE_DEFINES ${FTE_DEFINES};HAVE_OPENSSL)
# SET(FTESV_DEFINES ${FTESV_DEFINES};HAVE_OPENSSL) # SET(FTESV_DEFINES ${FTESV_DEFINES};HAVE_OPENSSL)
@ -310,8 +321,8 @@ ELSEIF(1) #SDL
INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
#SDL2.0.7 supports vulkan, so lets use it. #SDL2.0.7 supports vulkan, so lets use it.
SET(FTE_DEFINES ${FTE_DEFINES};FTE_SDL;DYNAMIC_LIBPNG;DYNAMIC_LIBJPEG) SET(FTE_DEFINES ${FTE_DEFINES};FTE_SDL)
SET(FTE_LIBS ${FTE_LIBS} ${ZLIB_LIBRARIES} m ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES}) SET(FTE_LIBS ${FTE_LIBS} m ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES})
SET(FTE_ARCH_FILES SET(FTE_ARCH_FILES
engine/client/sys_sdl.c engine/client/sys_sdl.c
engine/client/snd_al.c engine/client/snd_al.c
@ -322,7 +333,7 @@ ELSEIF(1) #SDL
) )
SET(FTESV_DEFINES FTE_SDL) SET(FTESV_DEFINES FTE_SDL)
SET(FTESV_LIBS ${FTESV_LIBS} ${ZLIB_LIBRARIES} m ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES}) SET(FTESV_LIBS ${FTESV_LIBS} m ${CMAKE_DL_LIBS} ${SDL2_LIBRARIES})
IF(WIN32) IF(WIN32)
SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32) SET(FTE_LIBS ${FTE_LIBS} wsock32 gdi32 ole32)
@ -756,6 +767,14 @@ ELSE()
SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}") SET_TARGET_PROPERTIES(iqmtool PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}")
SET(INSTALLTARGS ${INSTALLTARGS} iqmtool) SET(INSTALLTARGS ${INSTALLTARGS} iqmtool)
# ADD_EXECUTABLE(imgtool
# engine/client/image.c
# imgtool.c
# )
# SET_TARGET_PROPERTIES(imgtool PROPERTIES COMPILE_DEFINITIONS "IMGTOOL;${FTE_LIB_DEFINES};${FTE_DEFINES};${FTE_REVISON}")
# TARGET_LINK_LIBRARIES(imgtool ${FTE_LIBS} )
# SET(INSTALLTARGS ${INSTALLTARGS} imgtool)
ADD_EXECUTABLE(qtv ADD_EXECUTABLE(qtv
fteqtv/netchan.c fteqtv/netchan.c
fteqtv/parse.c fteqtv/parse.c
@ -776,7 +795,7 @@ ELSE()
) )
SET_TARGET_PROPERTIES(qtv PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}") SET_TARGET_PROPERTIES(qtv PROPERTIES COMPILE_DEFINITIONS "${FTE_REVISON}")
IF(WIN32) IF(WIN32)
TARGET_LINK_LIBRARIES(qtv ${ZLIB_LIBRARIES} ws2_32 winmm) TARGET_LINK_LIBRARIES(qtv ws2_32 winmm)
ELSE() ELSE()
TARGET_LINK_LIBRARIES(qtv m) TARGET_LINK_LIBRARIES(qtv m)
ENDIF() ENDIF()
@ -812,7 +831,7 @@ ELSE()
) )
SET_TARGET_PROPERTIES(httpserver PROPERTIES COMPILE_DEFINITIONS "WEBSERVER;WEBSVONLY;${FTE_REVISON}") SET_TARGET_PROPERTIES(httpserver PROPERTIES COMPILE_DEFINITIONS "WEBSERVER;WEBSVONLY;${FTE_REVISON}")
IF(WIN32) IF(WIN32)
TARGET_LINK_LIBRARIES(httpserver ${ZLIB_LIBRARIES} ws2_32) TARGET_LINK_LIBRARIES(httpserver ws2_32)
ENDIF() ENDIF()
#SET(INSTALLTARGS ${INSTALLTARGS} httpserver) #SET(INSTALLTARGS ${INSTALLTARGS} httpserver)

View file

@ -107,9 +107,14 @@ ifeq (,$(findstring DNO_VORBISFILE,$(FTE_CONFIG_EXTRA)))
endif endif
ifneq (,$(findstring DLINK_FREETYPE,$(FTE_CONFIG_EXTRA))) ifneq (,$(findstring DLINK_FREETYPE,$(FTE_CONFIG_EXTRA)))
LINK_FREETYPE=1 LINK_FREETYPE=1
LINK_ZLIB=1
LINK_PNG=1 LINK_PNG=1
endif endif
ifneq (,$(findstring DLINK_JPEG,$(FTE_CONFIG_EXTRA)))
LINK_JPEG=1
endif
ifneq (,$(findstring DLINK_PNG,$(FTE_CONFIG_EXTRA))) ifneq (,$(findstring DLINK_PNG,$(FTE_CONFIG_EXTRA)))
LINK_ZLIB=1
LINK_PNG=1 LINK_PNG=1
endif endif
ifneq (,$(findstring -Os,$(FTE_CONFIG_EXTRA))) ifneq (,$(findstring -Os,$(FTE_CONFIG_EXTRA)))
@ -555,14 +560,14 @@ BASELDFLAGS ?= -lm -ldl -lpthread
ifeq (win,$(findstring cyg,$(FTE_TARGET))$(findstring win,$(FTE_TARGET))) ifeq (win,$(findstring cyg,$(FTE_TARGET))$(findstring win,$(FTE_TARGET)))
BASELDFLAGS=-lm BASELDFLAGS=-lm
MINGW_LIBS_DIR=$(LIBS_DIR)/mingw-libs # MINGW_LIBS_DIR=$(LIBS_DIR)/mingw-libs
ifeq ($(shell echo $(FTE_TARGET)|grep -v win64),) # ifeq ($(shell echo $(FTE_TARGET)|grep -v win64),)
MINGW_LIBS_DIR=$(LIBS_DIR)/mingw64-libs # MINGW_LIBS_DIR=$(LIBS_DIR)/mingw64-libs
endif # endif
IMAGELDFLAGS=$(MINGW_LIBS_DIR)/libpng.a $(MINGW_LIBS_DIR)/libz.a $(MINGW_LIBS_DIR)/libjpeg.a # IMAGELDFLAGS=$(MINGW_LIBS_DIR)/libpng.a $(MINGW_LIBS_DIR)/libz.a $(MINGW_LIBS_DIR)/libjpeg.a
OGGVORBISLDFLAGS=$(MINGW_LIBS_DIR)/libvorbisfile.a $(MINGW_LIBS_DIR)/libvorbis.a $(MINGW_LIBS_DIR)/libogg.a # OGGVORBISLDFLAGS=$(MINGW_LIBS_DIR)/libvorbisfile.a $(MINGW_LIBS_DIR)/libvorbis.a $(MINGW_LIBS_DIR)/libogg.a
endif endif
#try to statically link #try to statically link
@ -572,7 +577,6 @@ ifeq ($(COMPILE_SYS),Darwin)
OGGVORBISLDFLAGS = $(shell pkg-config vorbisfile --variable=libdir)/libvorbisfile.a $(shell pkg-config vorbis --variable=libdir)/libvorbis.a $(shell pkg-config ogg --variable=libdir)/libogg.a OGGVORBISLDFLAGS = $(shell pkg-config vorbisfile --variable=libdir)/libvorbisfile.a $(shell pkg-config vorbis --variable=libdir)/libvorbis.a $(shell pkg-config ogg --variable=libdir)/libogg.a
endif endif
endif endif
IMAGELDFLAGS ?= -lpng -ljpeg
OGGVORBISLDFLAGS ?= -lvorbisfile -lvorbis -logg OGGVORBISLDFLAGS ?= -lvorbisfile -lvorbis -logg
VISIBILITY_FLAGS?= VISIBILITY_FLAGS?=
@ -923,9 +927,17 @@ ifeq (1,$(LINK_FREETYPE))
CLIENTLDDEPS+=-lfreetype CLIENTLDDEPS+=-lfreetype
endif endif
ifeq (1,$(LINK_PNG)) ifeq (1,$(LINK_PNG))
CLIENTLIBFLAGS+=-DAVAIL_PNG CLIENTLIBFLAGS+=-DLIBPNG_STATIC
CLIENTLDDEPS+=-lpng CLIENTLDDEPS+=-lpng
endif endif
ifeq (1,$(LINK_JPEG))
CLIENTLIBFLAGS+=-DLIBJPEG_STATIC
CLIENTLDDEPS+=-ljpeg
endif
ifeq (1,$(LINK_ZLIB))
CLIENTLIBFLAGS+=-DZLIB_STATIC
CLIENTLDDEPS+=-lz
endif
ifeq (1,$(strip $(INTERNAL_BULLET))) ifeq (1,$(strip $(INTERNAL_BULLET)))
COMMON_OBJS+=com_phys_bullet.o COMMON_OBJS+=com_phys_bullet.o
ALL_CFLAGS+=-I/usr/include/bullet -I$(ARCHLIBS)/bullet3-$(BULLETVER)/src ALL_CFLAGS+=-I/usr/include/bullet -I$(ARCHLIBS)/bullet3-$(BULLETVER)/src
@ -1270,7 +1282,6 @@ ifeq (win,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
BITS=64 BITS=64
endif endif
QCC_DIR=winqcc$(BITS) QCC_DIR=winqcc$(BITS)
QCC_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a
BASELDFLAGS= BASELDFLAGS=
@ -1287,7 +1298,7 @@ ifeq (win,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
LIBS_DIR = $(BASE_DIR)/libs LIBS_DIR = $(BASE_DIR)/libs
SV_EXE_NAME=../$(EXE_NAME)sv$(BITS)$(EXEPOSTFIX) SV_EXE_NAME=../$(EXE_NAME)sv$(BITS)$(EXEPOSTFIX)
SV_LDFLAGS=$(MINGW_LIBS_DIR)/libz.a -lws2_32 -lwinmm SV_LDFLAGS=-lws2_32 -lwinmm
SV_DIR=sv_mingw$(BITS) SV_DIR=sv_mingw$(BITS)
SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) $(BOTLIB_OBJS) fs_win32.o $(LTO_END) resources.o $(LTO_START) SV_OBJS=$(COMMON_OBJS) $(SERVER_OBJS) $(PROGS_OBJS) $(WINDOWSSERVERONLY_OBJS) $(BOTLIB_OBJS) fs_win32.o $(LTO_END) resources.o $(LTO_START)
SV_CFLAGS=$(SERVER_ONLY_CFLAGS) $(W32_CFLAGS) SV_CFLAGS=$(SERVER_ONLY_CFLAGS) $(W32_CFLAGS)
@ -1334,6 +1345,13 @@ ifeq (win,$(findstring win,$(FTE_TARGET))$(findstring _SDL,$(FTE_TARGET)))
MINGL_EXE_NAME=../fteminglqw$(BITS)$(EXEPOSTFIX) MINGL_EXE_NAME=../fteminglqw$(BITS)$(EXEPOSTFIX)
MINGL_DIR=mingl_mgw$(BITS) MINGL_DIR=mingl_mgw$(BITS)
ifeq (,$(findstring NO_ZLIB,$(CFLAGS)))
SV_LDFLAGS+=-lz
GL_LDFLAGS+=-lz
VK_LDFLAGS+=-lz
M_LDFLAGS+=-lz
QCC_LDFLAGS+=-L$(ARCHLIBS) -lz
endif
ifeq ($(NOCOMPAT),1) ifeq ($(NOCOMPAT),1)
SV_EXE_NAME=../engine-sv$(BITS)$(EXEPOSTFIX) SV_EXE_NAME=../engine-sv$(BITS)$(EXEPOSTFIX)
GL_EXE_NAME=../engine-gl$(BITS)$(EXEPOSTFIX) GL_EXE_NAME=../engine-gl$(BITS)$(EXEPOSTFIX)
@ -1487,7 +1505,7 @@ ifneq ($(shell echo $(FTE_TARGET)|grep macosx),)
GL_CFLAGS=$(GLCFLAGS) -D__MACOSX__ -L/sw/lib -I/sw/include -L/opt/local/lib -I/opt/local/include -I$(LIBS_DIR) GL_CFLAGS=$(GLCFLAGS) -D__MACOSX__ -L/sw/lib -I/sw/include -L/opt/local/lib -I/opt/local/include -I$(LIBS_DIR)
endif endif
GL_LDFLAGS=-framework AGL -framework OpenGL -framework Cocoa -framework AudioUnit -lz -lpng -ljpeg GL_LDFLAGS=-framework AGL -framework OpenGL -framework Cocoa -framework AudioUnit
GLCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(GLQUAKE_OBJS) $(BOTLIB_OBJS) gl_vidcocoa.mo gl_vidmacos.o sys_linux.o cd_null.o snd_macos.o sys_linux_threads.o GLCL_OBJS=$(GL_OBJS) $(D3DGL_OBJS) $(GLQUAKE_OBJS) $(BOTLIB_OBJS) gl_vidcocoa.mo gl_vidmacos.o sys_linux.o cd_null.o snd_macos.o sys_linux_threads.o
GL_EXE_NAME=../$(EXE_NAME)-macosx-gl$(EXTENSION)$(BITS) GL_EXE_NAME=../$(EXE_NAME)-macosx-gl$(EXTENSION)$(BITS)

View file

@ -1066,33 +1066,8 @@ void SCR_DrawCursor(void)
FS_FreeFile(filedata); FS_FreeFile(filedata);
if (rgbadata) if (rgbadata)
{ //image loaded properly, yay { //image loaded properly, yay
if ((format==PTI_RGBX8 || format==PTI_LLLX8) && !strchr(bestname, ':')) if ((format==PTI_BGRX8 || format==PTI_RGBX8 || format==PTI_LLLX8) && !strchr(bestname, ':'))
{ //people seem to insist on using jpgs, which don't have alpha. Image_ReadExternalAlpha(rgbadata, width, height, bestname, &format);
//so screw over the alpha channel if needed.
unsigned int alpha_width, alpha_height, p;
char aname[MAX_QPATH];
unsigned char *alphadata;
char *alph;
size_t alphsize;
char ext[8];
COM_StripExtension(bestname, aname, sizeof(aname));
COM_FileExtension(bestname, ext, sizeof(ext));
Q_strncatz(aname, "_alpha.", sizeof(aname));
Q_strncatz(aname, ext, sizeof(aname));
alphsize = FS_LoadFile(aname, (void**)&alph);
if (alph)
{
if ((alphadata = ReadRawImageFile(alph, alphsize, &alpha_width, &alpha_height, &format, true, aname)))
{
if (alpha_width == width && alpha_height == height)
for (p = 0; p < alpha_width*alpha_height; p++)
rgbadata[(p<<2) + 3] = (alphadata[(p<<2) + 0] + alphadata[(p<<2) + 1] + alphadata[(p<<2) + 2])/3;
BZ_Free(alphadata);
}
FS_FreeFile(alph);
}
format = (format==PTI_LLLX8)?PTI_LLLA8:PTI_RGBA8;
}
kcurs->handle = rf->VID_CreateCursor(rgbadata, width, height, format, kcurs->hotspot[0], kcurs->hotspot[1], kcurs->scale); //try the fallback kcurs->handle = rf->VID_CreateCursor(rgbadata, width, height, format, kcurs->hotspot[0], kcurs->hotspot[1], kcurs->scale); //try the fallback
BZ_Free(rgbadata); BZ_Free(rgbadata);

File diff suppressed because it is too large Load diff

View file

@ -473,8 +473,8 @@ qboolean Image_WriteKTXFile(const char *filename, enum fs_relative fsroot, struc
qboolean Image_WriteDDSFile(const char *filename, enum fs_relative fsroot, struct pendingtextureinfo *mips); qboolean Image_WriteDDSFile(const char *filename, enum fs_relative fsroot, struct pendingtextureinfo *mips);
void Image_BlockSizeForEncoding(uploadfmt_t encoding, unsigned int *blockbytes, unsigned int *blockwidth, unsigned int *blockheight); void Image_BlockSizeForEncoding(uploadfmt_t encoding, unsigned int *blockbytes, unsigned int *blockwidth, unsigned int *blockheight);
const char *Image_FormatName(uploadfmt_t encoding); const char *Image_FormatName(uploadfmt_t encoding);
image_t *Image_LoadTexture (const char *identifier, int width, int height, uploadfmt_t fmt, void *data, unsigned int flags); image_t *Image_LoadTexture (const char *identifier, int width, int height, uploadfmt_t fmt, void *data, unsigned int flags);
struct pendingtextureinfo *Image_LoadMipsFromMemory(int flags, const char *iname, const char *fname, qbyte *filedata, int filesize);
#ifdef D3D8QUAKE #ifdef D3D8QUAKE
void D3D8_Set2D (void); void D3D8_Set2D (void);
@ -500,8 +500,6 @@ texid_tf R_LoadHiResTexture(const char *name, const char *subpath, unsigned int
texid_tf R_LoadBumpmapTexture(const char *name, const char *subpath); texid_tf R_LoadBumpmapTexture(const char *name, const char *subpath);
void R_LoadNumberedLightTexture(struct dlight_s *dl, int cubetexnum); void R_LoadNumberedLightTexture(struct dlight_s *dl, int cubetexnum);
qbyte *ReadRawImageFile(qbyte *buf, int len, int *width, int *height, uploadfmt_t *format, qboolean force_rgba8, const char *fname);
extern texid_t particletexture; extern texid_t particletexture;
extern texid_t particlecqtexture; extern texid_t particlecqtexture;
extern texid_t explosiontexture; extern texid_t explosiontexture;
@ -599,11 +597,12 @@ void RQ_Shutdown(void);
void WritePCXfile (const char *filename, enum fs_relative fsroot, qbyte *data, int width, int height, int rowbytes, qbyte *palette, qboolean upload); //data is 8bit. void WritePCXfile (const char *filename, enum fs_relative fsroot, qbyte *data, int width, int height, int rowbytes, qbyte *palette, qboolean upload); //data is 8bit.
qbyte *ReadPCXFile(qbyte *buf, int length, int *width, int *height); qbyte *ReadPCXFile(qbyte *buf, int length, int *width, int *height);
void *ReadTargaFile(qbyte *buf, int length, int *width, int *height, uploadfmt_t *format, qboolean greyonly, uploadfmt_t forceformat); void *ReadTargaFile(qbyte *buf, int length, int *width, int *height, uploadfmt_t *format, qboolean greyonly, uploadfmt_t forceformat);
qbyte *ReadJPEGFile(qbyte *infile, int length, int *width, int *height);
qbyte *ReadPNGFile(const char *fname, qbyte *buf, int length, int *width, int *height, uploadfmt_t *format); qbyte *ReadPNGFile(const char *fname, qbyte *buf, int length, int *width, int *height, uploadfmt_t *format);
qbyte *ReadPCXPalette(qbyte *buf, int len, qbyte *out); qbyte *ReadPCXPalette(qbyte *buf, int len, qbyte *out);
void *Image_ResampleTexture (uploadfmt_t format, const void *in, int inwidth, int inheight, void *out, int outwidth, int outheight);
qbyte *ReadRawImageFile(qbyte *buf, int len, int *width, int *height, uploadfmt_t *format, qboolean force_rgba8, const char *fname);
void *Image_ResampleTexture (uploadfmt_t format, const void *in, int inwidth, int inheight, void *out, int outwidth, int outheight);
void Image_ReadExternalAlpha(qbyte *rgbadata, size_t imgwidth, size_t imgheight, const char *fname, uploadfmt_t *format);
void BoostGamma(qbyte *rgba, int width, int height, uploadfmt_t fmt); void BoostGamma(qbyte *rgba, int width, int height, uploadfmt_t fmt);
void SaturateR8G8B8(qbyte *data, int size, float sat); void SaturateR8G8B8(qbyte *data, int size, float sat);
void AddOcranaLEDsIndexed (qbyte *image, int h, int w); void AddOcranaLEDsIndexed (qbyte *image, int h, int w);

View file

@ -282,7 +282,7 @@ cvar_t vid_bpp = CVARFD ("vid_bpp", "0",
CVAR_ARCHIVE | CVAR_VIDEOLATCH, "The number of colour bits to request from the renedering context"); CVAR_ARCHIVE | CVAR_VIDEOLATCH, "The number of colour bits to request from the renedering context");
cvar_t vid_desktopsettings = CVARFD ("vid_desktopsettings", "0", cvar_t vid_desktopsettings = CVARFD ("vid_desktopsettings", "0",
CVAR_ARCHIVE | CVAR_VIDEOLATCH, "Ignore the values of vid_width and vid_height, and just use the same settings that are used for the desktop."); CVAR_ARCHIVE | CVAR_VIDEOLATCH, "Ignore the values of vid_width and vid_height, and just use the same settings that are used for the desktop.");
cvar_t vid_fullscreen = CVARF ("vid_fullscreen", "1", cvar_t vid_fullscreen = CVARF ("vid_fullscreen", "2",
CVAR_ARCHIVE|CVAR_VIDEOLATCH); CVAR_ARCHIVE|CVAR_VIDEOLATCH);
cvar_t vid_height = CVARFD ("vid_height", "0", cvar_t vid_height = CVARFD ("vid_height", "0",
CVAR_ARCHIVE | CVAR_VIDEOLATCH, "The screen height to attempt to use, in physical pixels. 0 means use desktop resolution."); CVAR_ARCHIVE | CVAR_VIDEOLATCH, "The screen height to attempt to use, in physical pixels. 0 means use desktop resolution.");

View file

@ -113,7 +113,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #endif
#endif #endif
#ifdef MASTERONLY #ifdef IMGTOOL
#undef WEBCLIENT
#undef LOADERTHREAD
#elif defined(MASTERONLY)
#define SV_MASTER #define SV_MASTER
#undef SUBSERVERS #undef SUBSERVERS
#undef PLUGINS #undef PLUGINS
@ -415,7 +418,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define SQL #define SQL
#endif #endif
#if defined(AVAIL_GZDEC) && (!defined(AVAIL_ZLIB) || defined(NPFTE)) #if defined(AVAIL_GZDEC) && (!defined(AVAIL_ZLIB) || defined(NPFTE) || defined(NO_ZLIB))
//gzip needs zlib to work (pk3s can still contain non-compressed files) //gzip needs zlib to work (pk3s can still contain non-compressed files)
#undef AVAIL_GZDEC #undef AVAIL_GZDEC
#endif #endif