![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
Go to the source code of this file.
Macros | |
#define | Image_LinearFloatFromsRGB(c) |
#define | Image_LinearFloatFromsRGBFloat(c) |
#define | Image_sRGBFloatFromLinear(c) |
#define | Image_sRGBFloatFromLinear_Lightmap(c) |
#define | Image_sRGBFloatFromLinearFloat(c) |
Functions | |
void | Image_Copy8bitBGRA (const unsigned char *in, unsigned char *out, int pixels, const unsigned int *pal) |
void | Image_CopyMux (unsigned char *outpixels, const unsigned char *inpixels, int inputwidth, int inputheight, qbool inputflipx, qbool inputflipy, qbool inputflipdiagonal, int numoutputcomponents, int numinputcomponents, int *outputinputcomponentindices) |
void | Image_FixTransparentPixels_f (cmd_state_t *cmd) |
void | Image_GammaRemapRGB (const unsigned char *in, unsigned char *out, int pixels, const unsigned char *gammar, const unsigned char *gammag, const unsigned char *gammab) |
unsigned char * | Image_GenerateNoTexture (void) |
qbool | Image_GetStockPicSize (const char *filename, int *returnwidth, int *returnheight) |
void | Image_HeightmapToNormalmap_BGRA (const unsigned char *inpixels, unsigned char *outpixels, int width, int height, int clamp, float bumpscale) |
void | Image_MakeLinearColorsFromsRGB (unsigned char *pout, const unsigned char *pin, int numpixels) |
void | Image_MakesRGBColorsFromLinear_Lightmap (unsigned char *pout, const unsigned char *pin, int numpixels) |
void | Image_MipReduce32 (const unsigned char *in, unsigned char *out, int *width, int *height, int *depth, int destwidth, int destheight, int destdepth) |
void | Image_Resample32 (const void *indata, int inwidth, int inheight, int indepth, void *outdata, int outwidth, int outheight, int outdepth, int quality) |
void | Image_StripImageExtension (const char *in, char *out, size_t size_out) |
qbool | Image_WriteTGABGR_preflipped (const char *filename, int width, int height, const unsigned char *data) |
qbool | Image_WriteTGABGRA (const char *filename, int width, int height, const unsigned char *data) |
unsigned char * | loadimagepixelsbgra (const char *filename, qbool complain, qbool allowFixtrans, qbool convertsRGB, int *miplevel) |
qbool | LoadPCX_PaletteOnly (const unsigned char *f, int filesize, unsigned char *palette768b) |
qbool | LoadPCX_QWSkin (const unsigned char *f, int filesize, unsigned char *pixels, int outwidth, int outheight) |
rtexture_t * | loadtextureimage (rtexturepool_t *pool, const char *filename, qbool complain, int flags, qbool allowFixtrans, qbool sRGB) |
unsigned char * | LoadTGA_BGRA (const unsigned char *f, int filesize, int *miplevel) |
qbool | LoadWAL_GetMetadata (const unsigned char *f, int filesize, int *retwidth, int *retheight, int *retflags, int *retvalue, int *retcontents, char *retanimname32c) |
Variables | |
int | image_height |
int | image_width |
cvar_t | r_fixtrans_auto |
#define Image_LinearFloatFromsRGB | ( | c | ) |
Definition at line 69 of file image.h.
Referenced by CL_NewParticle(), CL_SpawnDecalParticleForSurface(), Image_MakeLinearColorsFromsRGB(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadVertices(), R_LoadTextureDDSFile(), and V_CalcViewBlend().
#define Image_LinearFloatFromsRGBFloat | ( | c | ) |
#define Image_sRGBFloatFromLinear | ( | c | ) |
#define Image_sRGBFloatFromLinear_Lightmap | ( | c | ) |
Definition at line 71 of file image.h.
Referenced by Image_MakesRGBColorsFromLinear_Lightmap(), Mod_Q3BSP_LoadLightGrid(), and Mod_Q3BSP_LoadVertices().
#define Image_sRGBFloatFromLinearFloat | ( | c | ) |
Definition at line 68 of file image.h.
Referenced by R_RenderView(), and VID_BuildGammaTables().
void Image_Copy8bitBGRA | ( | const unsigned char * | in, |
unsigned char * | out, | ||
int | pixels, | ||
const unsigned int * | pal ) |
Definition at line 129 of file image.c.
References pixels.
Referenced by LoadWAL_BGRA(), Mod_Sprite_SharedSetup(), R_SkinFrame_GenerateTexturesFromQPixels(), and R_UploadFullTexture().
void Image_CopyMux | ( | unsigned char * | outpixels, |
const unsigned char * | inpixels, | ||
int | inputwidth, | ||
int | inputheight, | ||
qbool | inputflipx, | ||
qbool | inputflipy, | ||
qbool | inputflipdiagonal, | ||
int | numoutputcomponents, | ||
int | numinputcomponents, | ||
int * | outputinputcomponentindices ) |
Definition at line 24 of file image.c.
Referenced by Image_Compress(), R_LoadCubemap(), R_LoadSkyBox(), R_SetupTexture(), and SCR_ScreenShot().
void Image_FixTransparentPixels_f | ( | cmd_state_t * | cmd | ) |
Definition at line 1376 of file image.c.
References buf, cmd(), Cmd_Argc(), Cmd_Argv(), Con_Printf(), data, dpsnprintf(), fssearch_t::filenames, fixtransparentpixels(), FS_FreeSearch(), FS_Search(), i, image_height, Image_StripImageExtension(), image_width, Image_WriteTGABGRA(), loadimagepixelsbgra(), MAX_QPATH, Mem_Free, n, NULL, and fssearch_t::numfilenames.
Referenced by CL_InitCommands().
unsigned char * Image_GenerateNoTexture | ( | void | ) |
Definition at line 1887 of file image.c.
References data, image_height, image_width, Mem_Alloc, tempmempool, x, and y.
Referenced by R_BuildNoTexture(), R_SkinFrame_LoadExternal_SkinFrame(), and R_SkinFrame_LoadNoTexture().
Definition at line 1196 of file image.c.
References data, dpsnprintf(), FS_LoadFile(), MAX_QPATH, Mem_Free, tempmempool, w, and W_GetLumpName().
Referenced by Draw_CachePic_Flags().
void Image_HeightmapToNormalmap_BGRA | ( | const unsigned char * | inpixels, |
unsigned char * | outpixels, | ||
int | width, | ||
int | height, | ||
int | clamp, | ||
float | bumpscale ) |
Definition at line 1769 of file image.c.
References b, height, int(), n, VectorNormalize, width, x, x1, x2, y, and y2.
Referenced by R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), and R_SkinFrame_LoadInternalBGRA().
void Image_MakeLinearColorsFromsRGB | ( | unsigned char * | pout, |
const unsigned char * | pin, | ||
int | numpixels ) |
Definition at line 930 of file image.c.
References floor(), i, Image_LinearFloatFromsRGB, and image_linearfromsrgb.
Referenced by loadimagepixelsbgra(), R_LoadTextureDDSFile(), and R_SetupTexture().
void Image_MakesRGBColorsFromLinear_Lightmap | ( | unsigned char * | pout, |
const unsigned char * | pin, | ||
int | numpixels ) |
Definition at line 946 of file image.c.
References bound, floor(), i, Image_sRGBFloatFromLinear_Lightmap, and image_srgbfromlinear_lightmap.
Referenced by Mod_Q3BSP_LoadLightmaps(), and R_BuildLightMap().
void Image_MipReduce32 | ( | const unsigned char * | in, |
unsigned char * | out, | ||
int * | width, | ||
int * | height, | ||
int * | depth, | ||
int | destwidth, | ||
int | destheight, | ||
int | destdepth ) |
Definition at line 1689 of file image.c.
References Con_Printf(), depth, height, width, x, and y.
Referenced by Image_Compress(), and R_UploadFullTexture().
void Image_Resample32 | ( | const void * | indata, |
int | inwidth, | ||
int | inheight, | ||
int | indepth, | ||
void * | outdata, | ||
int | outwidth, | ||
int | outheight, | ||
int | outdepth, | ||
int | quality ) |
Definition at line 1675 of file image.c.
References Con_Printf(), Image_Resample32Lerp(), and Image_Resample32Nolerp().
Referenced by R_UploadFullTexture().
void Image_StripImageExtension | ( | const char * | in, |
char * | out, | ||
size_t | size_out ) |
Definition at line 913 of file image.c.
References dp_strlcpy, FS_FileExtension(), and FS_StripExtension().
Referenced by Image_FixTransparentPixels_f(), loadimagepixelsbgra(), Mod_BuildAliasSkinsFromSkinFiles(), R_SkinFrame_Find(), R_SkinFrame_FindNextByName(), and R_SkinFrame_LoadExternal_SkinFrame().
qbool Image_WriteTGABGR_preflipped | ( | const char * | filename, |
int | width, | ||
int | height, | ||
const unsigned char * | data ) |
Definition at line 1412 of file image.c.
References buffer, buffers, data, FS_WriteFileInBlocks(), height, ret, and width.
Referenced by SCR_ScreenShot().
qbool Image_WriteTGABGRA | ( | const char * | filename, |
int | width, | ||
int | height, | ||
const unsigned char * | data ) |
Definition at line 1436 of file image.c.
References buffer, data, FS_WriteFile(), height, Mem_Alloc, Mem_Free, ret, tempmempool, width, and y.
Referenced by Image_FixTransparentPixels_f(), Image_GenerateConChars(), loadimagepixelsbgra(), R_InitParticleTexture(), R_Shadow_DrawModelShadowMaps(), and SCR_ScreenShot().
unsigned char * loadimagepixelsbgra | ( | const char * | filename, |
qbool | complain, | ||
qbool | allowFixtrans, | ||
qbool | convertsRGB, | ||
int * | miplevel ) |
Definition at line 1043 of file image.c.
References buf, CL_KeepaliveMessage(), Con_DPrintf(), CON_ERROR, Con_Printf(), data, developer_loading, developer_texturelogging, dp_strlcpy, dpsnprintf(), f, fixtransparentpixels(), format, FS_FileExists(), FS_LoadFile(), FS_SanitizePath(), GAME_DELUXEQUAKE, GAME_TENEBRAE, gamemode, i, Image_CopyAlphaFromBlueBGRA(), Image_GetEmbeddedPicBGRA(), image_height, Image_MakeLinearColorsFromsRGB(), Image_StripImageExtension(), image_width, Image_WriteTGABGRA(), imageformats_dq, imageformats_gfx, imageformats_nopath, imageformats_other, imageformats_tenebrae, imageformats_textures, int(), cvar_t::integer, JPEG_LoadImage_BGRA(), LoadConChars_BGRA(), LoadLMP_BGRA(), Log_Printf(), MAX_QPATH, Mem_Free, n, name, NULL, r_fixtrans_auto, tempmempool, va(), and W_GetLumpName().
Referenced by Image_Compress(), Image_FixTransparentPixels_f(), loadtextureimage(), Mod_Q1BSP_LoadTextures(), Mod_Q3BSP_LoadLightmaps(), R_BuildFogHeightTexture(), R_LoadCubemap(), R_LoadSkyBox(), and R_SkinFrame_LoadExternal_SkinFrame().
Definition at line 365 of file image.c.
References f.
Referenced by Palette_LoadQ2Colormap().
qbool LoadPCX_QWSkin | ( | const unsigned char * | f, |
int | filesize, | ||
unsigned char * | pixels, | ||
int | outwidth, | ||
int | outheight ) |
Definition at line 286 of file image.c.
References a, pcx_t::bits_per_pixel, pcx_t::bytes_per_line, pcx_t::encoding, f, pcx_t::hres, image_height, image_width, LittleShort, pcx_t::manufacturer, pcx_t::palette_type, pixels, pcx_t::version, pcx_t::vres, x, x2, pcx_t::xmax, pcx_t::xmin, y, pcx_t::ymax, and pcx_t::ymin.
Referenced by R_LoadQWSkin().
rtexture_t * loadtextureimage | ( | rtexturepool_t * | pool, |
const char * | filename, | ||
qbool | complain, | ||
int | flags, | ||
qbool | allowFixtrans, | ||
qbool | sRGB ) |
Definition at line 1245 of file image.c.
References data, flags, image_height, image_width, loadimagepixelsbgra(), Mem_Free, NULL, R_LoadTexture2D(), R_PicmipForFlags(), TEXTYPE_BGRA, and TEXTYPE_SRGB_BGRA.
Referenced by R_InitParticleTexture().
Definition at line 401 of file image.c.
References TargaHeader::attributes, b, TargaHeader::colormap_index, TargaHeader::colormap_length, TargaHeader::colormap_size, TargaHeader::colormap_type, Con_Print(), Con_Printf(), f, TargaHeader::height, i, TargaHeader::id_length, image_height, TargaHeader::image_type, image_width, Mem_Alloc, NULL, TargaHeader::pixel_size, PrintTargaHeader(), tempmempool, TargaHeader::width, x, TargaHeader::x_origin, y, and TargaHeader::y_origin.
Referenced by Image_GenerateConChars().
qbool LoadWAL_GetMetadata | ( | const unsigned char * | f, |
int | filesize, | ||
int * | retwidth, | ||
int * | retheight, | ||
int * | retflags, | ||
int * | retvalue, | ||
int * | retcontents, | ||
char * | retanimname32c ) |
Definition at line 800 of file image.c.
References q2wal_t::animname, Con_Print(), q2wal_t::contents, f, q2wal_t::flags, q2wal_t::height, LittleLong, q2wal_t::value, and q2wal_t::width.
Referenced by Mod_Q2BSP_LoadTexinfo().
|
extern |
Definition at line 9 of file image.c.
Referenced by Curl_EndDownload(), Image_Compress(), Image_FixTransparentPixels_f(), Image_GenerateConChars(), Image_GenerateDitherPattern(), Image_GenerateNoTexture(), Image_GenerateWhite(), Image_GetEmbeddedPicBGRA(), JPEG_LoadImage_BGRA(), LoadConChars_BGRA(), loadimagepixelsbgra(), LoadLMP_BGRA(), LoadPCX_BGRA(), LoadPCX_QWSkin(), loadtextureimage(), LoadTGA_BGRA(), LoadWAL_BGRA(), Mod_Q1BSP_LoadTextures(), Mod_Q3BSP_LoadLightmaps(), PNG_LoadImage_BGRA(), R_BuildFogHeightTexture(), R_InitParticleTexture(), R_LoadCubemap(), R_LoadQWSkin(), R_LoadSkyBox(), R_SkinFrame_LoadExternal_SkinFrame(), VM_CL_ReadPicture(), W_ConvertWAD3TextureBGRA(), and W_GetTextureBGRA().
|
extern |
Definition at line 42 of file cl_cmd.c.
Referenced by CL_InitCommands(), and loadimagepixelsbgra().