From d76b75c113857ec50aa4896e9b3bd8c6d1cb06eb Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 16 Aug 2010 16:55:04 -0700 Subject: Load other missing UUIDs from OpenSim from file instead --- linden/indra/llcommon/imageids.h | 20 ++++++++++---------- linden/indra/newview/llviewerimagelist.cpp | 4 ++-- linden/indra/newview/llvlcomposition.cpp | 20 ++++++++++++++++---- linden/indra/newview/llvlcomposition.h | 1 + linden/indra/newview/llvosky.cpp | 4 ++-- linden/indra/newview/pipeline.cpp | 2 +- 6 files changed, 32 insertions(+), 19 deletions(-) diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h index 832708c..beba0e2 100644 --- a/linden/indra/llcommon/imageids.h +++ b/linden/indra/llcommon/imageids.h @@ -51,21 +51,21 @@ const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver const LLUUID IMG_CLOUD_POOF ("fc4b9f0b-d008-45c6-96a4-01dd947ac621"); // dataserver -const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver -const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver -const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver +const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver - legacy? +const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver - unused +const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver - unused const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver -const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver -const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver -const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver -const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver -const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver +const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver - unused +const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver - unused +const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver - unused +const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver - unused +const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver - legacy? -const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver -const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver +const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver - unused +const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver - unused const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER diff --git a/linden/indra/newview/llviewerimagelist.cpp b/linden/indra/newview/llviewerimagelist.cpp index 2280937..518f6d4 100644 --- a/linden/indra/newview/llviewerimagelist.cpp +++ b/linden/indra/newview/llviewerimagelist.cpp @@ -136,8 +136,8 @@ void LLViewerImageList::doPreloadImages() //uv_test->setMipFilterNearest(TRUE, TRUE); // prefetch specific UUIDs - getImage(IMG_SHOT, TRUE); - getImage(IMG_SMOKE_POOF, TRUE); + gImageList.getImageFromFile(IMG_SHOT.asString()+".j2c", TRUE, TRUE); /*getImage(IMG_SHOT, TRUE);*/ + gImageList.getImageFromFile(IMG_SMOKE_POOF.asString()+".j2c", TRUE, TRUE); /*getImage(IMG_SMOKE_POOF, TRUE);*/ LLViewerImage* image = getImageFromFile("silhouette.j2c", MIPMAP_YES, IMMEDIATE_YES); if (image) { diff --git a/linden/indra/newview/llvlcomposition.cpp b/linden/indra/newview/llvlcomposition.cpp index e12504c..535c504 100644 --- a/linden/indra/newview/llvlcomposition.cpp +++ b/linden/indra/newview/llvlcomposition.cpp @@ -72,10 +72,11 @@ LLVLComposition::LLVLComposition(LLSurface *surfacep, const U32 width, const F32 mSurfacep = surfacep; // Load Terrain Textures - Original ones - setDetailTextureID(0, TERRAIN_DIRT_DETAIL); - setDetailTextureID(1, TERRAIN_GRASS_DETAIL); - setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL); - setDetailTextureID(3, TERRAIN_ROCK_DETAIL); + // Load from file as OpenSim-based grids don't include these yet -- MC + setDetailTextureID(0, TERRAIN_DIRT_DETAIL.asString()+".j2c", TRUE, TRUE); + setDetailTextureID(1, TERRAIN_GRASS_DETAIL.asString()+".j2c", TRUE, TRUE); + setDetailTextureID(2, TERRAIN_MOUNTAIN_DETAIL.asString()+".j2c", TRUE, TRUE); + setDetailTextureID(3, TERRAIN_ROCK_DETAIL.asString()+".j2c", TRUE, TRUE); // Initialize the texture matrix to defaults. for (S32 i = 0; i < CORNER_COUNT; ++i) @@ -111,6 +112,17 @@ void LLVLComposition::setDetailTextureID(S32 corner, const LLUUID& id) mRawImages[corner] = NULL; } +void LLVLComposition::setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate) +{ + if(filename.empty()) + { + return; + } + mDetailTextures[corner] = gImageList.getImageFromFile(filename, usemipmap, levelimmediate); + mDetailTextures[corner]->setNoDelete() ; + mRawImages[corner] = NULL; +} + BOOL LLVLComposition::generateHeights(const F32 x, const F32 y, const F32 width, const F32 height) { diff --git a/linden/indra/newview/llvlcomposition.h b/linden/indra/newview/llvlcomposition.h index 6d5db3c..4ae296c 100644 --- a/linden/indra/newview/llvlcomposition.h +++ b/linden/indra/newview/llvlcomposition.h @@ -67,6 +67,7 @@ public: F32 getHeightRange(S32 corner); void setDetailTextureID(S32 corner, const LLUUID& id); + void setDetailTextureID(S32 corner, const std::string& filename, const bool& usemipmap, const bool& levelimmediate); void setStartHeight(S32 corner, F32 start_height); void setHeightRange(S32 corner, F32 range); diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index 1b9c7c0..d15a2dc 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp @@ -380,7 +380,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - mBloomTexturep = gImageList.getImage(IMG_BLOOM1); + mBloomTexturep = gImageList.getImageFromFile(IMG_BLOOM1.asString()+".j2c", TRUE, TRUE);/*gImageList.getImage(IMG_BLOOM1);*/ mBloomTexturep->setNoDelete() ; mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); @@ -476,7 +476,7 @@ void LLVOSky::restoreGL() mSunTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mMoonTexturep = gImageList.getImage(gMoonTextureID, TRUE, TRUE); mMoonTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); - mBloomTexturep = gImageList.getImage(IMG_BLOOM1); + mBloomTexturep = gImageList.getImageFromFile(IMG_BLOOM1.asString()+".j2c", TRUE, TRUE);/*gImageList.getImage(IMG_BLOOM1);*/ mBloomTexturep->setNoDelete() ; mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 05459ad..6b00ca6 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp @@ -2448,7 +2448,7 @@ void LLPipeline::renderHighlights() if (!mFaceSelectImagep) { // Load the select texture texture from file -- MC - mFaceSelectImagep = gImageList.getImageFromFile("a85ac674-cb75-4af6-9499-df7c5aaf7a28.j2c", TRUE, TRUE); /*gImageList.getImage(IMG_FACE_SELECT);*/ + mFaceSelectImagep = gImageList.getImageFromFile(IMG_FACE_SELECT.asString()+".j2c", TRUE, TRUE); /*gImageList.getImage(IMG_FACE_SELECT);*/ } mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA); -- cgit v1.1