summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-05-10 16:10:25 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-05-10 16:10:25 -0700
commitf2455ccaafec1b583d714b119dd68ec8b4165519 (patch)
treeb936569bf9d72742ef3af82f4aa8c4097f20ad8f
parentd2f71df15f14fe0f7e17f962d39d19dd571fc530 (diff)
Put back normal map and spec map initializers/destruction, delete FMOD refs (unneeded with FMODEX), make indra.l/y safe for bison >= 2.7
-rw-r--r--indra/cmake/CMakeLists.txt1
-rw-r--r--indra/cmake/FMOD.cmake39
-rw-r--r--indra/cmake/FindFMOD.cmake44
-rw-r--r--indra/llrender/llimagegl.cpp3
-rw-r--r--indra/lscript/lscript_compile/indra.l8
-rw-r--r--indra/lscript/lscript_compile/indra.y12
-rw-r--r--indra/newview/llviewerobject.cpp14
7 files changed, 17 insertions, 104 deletions
diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt
index 111f5897dd..10a23ea068 100644
--- a/indra/cmake/CMakeLists.txt
+++ b/indra/cmake/CMakeLists.txt
@@ -24,7 +24,6 @@ set(cmake_SOURCE_FILES
DragDrop.cmake
EXPAT.cmake
ExamplePlugin.cmake
- FMOD.cmake
FindAPR.cmake
FindAutobuild.cmake
FindBerkeleyDB.cmake
diff --git a/indra/cmake/FMOD.cmake b/indra/cmake/FMOD.cmake
deleted file mode 100644
index 3586c1160a..0000000000
--- a/indra/cmake/FMOD.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- cmake -*-
-
-# FMOD can be set when launching the make using the argument -DFMOD:BOOL=ON
-# When building using proprietary binaries though (i.e. having access to LL private servers),
-# we always build with FMOD.
-# Open source devs should use the -DFMOD:BOOL=ON then if they want to build with FMOD, whether
-# they are using STANDALONE or not.
-if (INSTALL_PROPRIETARY)
- set(FMOD ON CACHE BOOL "Use FMOD sound library.")
-endif (INSTALL_PROPRIETARY)
-
-if (FMOD)
- if (STANDALONE)
- # In that case, we use the version of the library installed on the system
- set(FMOD_FIND_REQUIRED ON)
- include(FindFMOD)
- else (STANDALONE)
- if (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- # If the path have been specified in the arguments, use that
- set(FMOD_LIBRARIES ${FMOD_LIBRARY})
- MESSAGE(STATUS "Using FMOD path: ${FMOD_LIBRARIES}, ${FMOD_INCLUDE_DIR}")
- else (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- # If not, we're going to try to get the package listed in autobuild.xml
- # Note: if you're not using INSTALL_PROPRIETARY, the package URL should be local (file:/// URL)
- # as accessing the private LL location will fail if you don't have the credential
- include(Prebuilt)
- use_prebuilt_binary(fmod)
- if (WINDOWS)
- set(FMOD_LIBRARY fmod)
- elseif (DARWIN)
- set(FMOD_LIBRARY fmod)
- elseif (LINUX)
- set(FMOD_LIBRARY fmod-3.75)
- endif (WINDOWS)
- set(FMOD_LIBRARIES ${FMOD_LIBRARY})
- set(FMOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include)
- endif (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- endif (STANDALONE)
-endif (FMOD)
diff --git a/indra/cmake/FindFMOD.cmake b/indra/cmake/FindFMOD.cmake
deleted file mode 100644
index 1ebbc8c96e..0000000000
--- a/indra/cmake/FindFMOD.cmake
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- cmake -*-
-
-# - Find FMOD
-# Find the FMOD includes and library
-# This module defines
-# FMOD_INCLUDE_DIR, where to find fmod.h and fmod_errors.h
-# FMOD_LIBRARIES, the libraries needed to use FMOD.
-# FMOD, If false, do not try to use FMOD.
-# also defined, but not for general use are
-# FMOD_LIBRARY, where to find the FMOD library.
-
-FIND_PATH(FMOD_INCLUDE_DIR fmod.h PATH_SUFFIXES fmod)
-
-SET(FMOD_NAMES ${FMOD_NAMES} fmod fmodvc fmodex fmod-3.75)
-FIND_LIBRARY(FMOD_LIBRARY
- NAMES ${FMOD_NAMES}
- PATH_SUFFIXES fmod
- )
-
-IF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- SET(FMOD_LIBRARIES ${FMOD_LIBRARY})
- SET(FMOD_FOUND "YES")
-ELSE (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
- SET(FMOD_FOUND "NO")
-ENDIF (FMOD_LIBRARY AND FMOD_INCLUDE_DIR)
-
-IF (FMOD_FOUND)
- IF (NOT FMOD_FIND_QUIETLY)
- MESSAGE(STATUS "Found FMOD: ${FMOD_LIBRARIES}")
- ENDIF (NOT FMOD_FIND_QUIETLY)
-ELSE (FMOD_FOUND)
- IF (FMOD_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find FMOD library")
- ENDIF (FMOD_FIND_REQUIRED)
-ENDIF (FMOD_FOUND)
-
-# Deprecated declarations.
-SET (NATIVE_FMOD_INCLUDE_PATH ${FMOD_INCLUDE_DIR} )
-GET_FILENAME_COMPONENT (NATIVE_FMOD_LIB_PATH ${FMOD_LIBRARY} PATH)
-
-MARK_AS_ADVANCED(
- FMOD_LIBRARY
- FMOD_INCLUDE_DIR
- )
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index e0fe9e783d..bcbd155423 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -773,7 +773,10 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips)
{
S32 bytes = w * h * mComponents;
#ifdef SHOW_ASSERT
+ llassert(prev_mip_data);
+ llassert(cur_mip_size == bytes*4);
#endif
+
U8* new_data = new U8[bytes];
#ifdef SHOW_ASSERT
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 9132d5d528..1bb38bbf65 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -79,17 +79,9 @@ void parse_string();
#define yyfree indra_free
-#if LL_WINDOWS
-#if defined(__cplusplus)
-extern "C" { int yylex( void ); }
-extern "C" { int yyparse( void ); }
-extern "C" { int yyerror(const char *fmt, ...); }
-#endif
-#else
int yylex( void );
int yyparse( void );
int yyerror(const char *fmt, ...);
-#endif
%}
diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y
index 9c2ed02f72..a0a034d21c 100644
--- a/indra/lscript/lscript_compile/indra.y
+++ b/indra/lscript/lscript_compile/indra.y
@@ -2,12 +2,6 @@
#include "linden_common.h"
#include "lscript_tree.h"
- #if LL_WINDOWS
- #ifdef __cplusplus
- extern "C" {
- #endif
- #endif
-
int yylex(void);
int yyparse( void );
int yyerror(const char *fmt, ...);
@@ -22,12 +16,6 @@
#pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels
#endif
- #if LL_WINDOWS
- #ifdef __cplusplus
- }
- #endif
- #endif
-
%}
%union
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 96e701a6cb..2965d968a3 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -201,6 +201,8 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe
mTotalCRC(0),
mListIndex(-1),
mTEImages(NULL),
+ mTENormalMaps(NULL),
+ mTESpecularMaps(NULL),
mGLName(0),
mbCanSelect(TRUE),
mFlags(0),
@@ -321,6 +323,18 @@ void LLViewerObject::deleteTEImages()
{
delete[] mTEImages;
mTEImages = NULL;
+
+ if (mTENormalMaps != NULL)
+ {
+ delete[] mTENormalMaps;
+ mTENormalMaps = NULL;
+ }
+
+ if (mTESpecularMaps != NULL)
+ {
+ delete[] mTESpecularMaps;
+ mTESpecularMaps = NULL;
+ }
}
void LLViewerObject::markDead()