Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Unvanquished/Unvanquished into co…
Browse files Browse the repository at this point in the history
…nnectionless_packet
  • Loading branch information
mbasaglia committed Feb 27, 2016
2 parents dbc642a + 996b3c5 commit 8eb0659
Show file tree
Hide file tree
Showing 506 changed files with 623 additions and 80,529 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -4,3 +4,6 @@
[submodule "daemon/libs/breakpad"]
path = daemon/libs/breakpad
url = https://github.com/Unvanquished/breakpad.git
[submodule "libs/libRocket"]
path = libs/libRocket
url = https://github.com/Unvanquished/libRocket.git
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -25,7 +25,7 @@ matrix:

install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo rm -rf /opt/python; fi # Delete conflicting python
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install software-properties-common; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq install software-properties-common; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository ppa:george-edison55/cmake-3.x -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq install
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -53,8 +53,8 @@ if (BUILD_CGAME AND (BUILD_GAME_NATIVE_DLL OR BUILD_GAME_NATIVE_EXE OR NACL))
find_package(Freetype REQUIRED)
find_package(Lua REQUIRED)
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/libRocket.cmake)
include_directories(${FREETYPE_INCLUDE_DIRS} ${LUA_INCLUDE_DIR})
add_subdirectory(${LIB_DIR}/libRocket)
set_target_properties(ROCKET_LIB PROPERTIES FOLDER "libs")
include_directories(${ROCKET_INCLUDE_DIRS})
endif()
Expand Down
13 changes: 0 additions & 13 deletions daemon/src/common/Color.cpp
Expand Up @@ -34,19 +34,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

namespace Color {

Color Black = { 0.00, 0.00, 0.00, 1.00 };
Color Red = { 1.00, 0.00, 0.00, 1.00 };
Color Green = { 0.00, 1.00, 0.00, 1.00 };
Color Blue = { 0.00, 0.00, 1.00, 1.00 };
Color Yellow = { 1.00, 1.00, 0.00, 1.00 };
Color Orange = { 1.00, 0.50, 0.00, 1.00 };
Color Magenta = { 1.00, 0.00, 1.00, 1.00 };
Color Cyan = { 0.00, 1.00, 1.00, 1.00 };
Color White = { 1.00, 1.00, 1.00, 1.00 };
Color LtGrey = { 0.75, 0.75, 0.75, 1.00 };
Color MdGrey = { 0.50, 0.50, 0.50, 1.00 };
Color LtOrange = { 0.50, 0.25, 0.00, 1.00 };

static Color g_color_table[ 32 ] =
{
{ 0.20f, 0.20f, 0.20f, 1.00f }, // 0 - black 0
Expand Down
24 changes: 12 additions & 12 deletions daemon/src/common/Color.h
Expand Up @@ -352,18 +352,18 @@ enum {
}; // enum
} // namespace Constants

extern Color Black;
extern Color Red;
extern Color Green;
extern Color Blue;
extern Color Yellow;
extern Color Orange;
extern Color Magenta;
extern Color Cyan;
extern Color White;
extern Color LtGrey;
extern Color MdGrey;
extern Color LtOrange;
const Color Black = { 0.00, 0.00, 0.00, 1.00 };
const Color Red = { 1.00, 0.00, 0.00, 1.00 };
const Color Green = { 0.00, 1.00, 0.00, 1.00 };
const Color Blue = { 0.00, 0.00, 1.00, 1.00 };
const Color Yellow = { 1.00, 1.00, 0.00, 1.00 };
const Color Orange = { 1.00, 0.50, 0.00, 1.00 };
const Color Magenta = { 1.00, 0.00, 1.00, 1.00 };
const Color Cyan = { 0.00, 1.00, 1.00, 1.00 };
const Color White = { 1.00, 1.00, 1.00, 1.00 };
const Color LtGrey = { 0.75, 0.75, 0.75, 1.00 };
const Color MdGrey = { 0.50, 0.50, 0.50, 1.00 };
const Color LtOrange = { 0.50, 0.25, 0.00, 1.00 };

/*
* Token for parsing colored strings
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/engine/client/cl_console.cpp
Expand Up @@ -336,7 +336,7 @@ bool Con_CheckResize()
// Quick case for empty lines
if ( line.empty() )
{
old_lines.emplace_back();
consoleState.lines.emplace_back();
continue;
}

Expand Down
49 changes: 46 additions & 3 deletions daemon/src/engine/renderer/tr_bsp.cpp
Expand Up @@ -3900,9 +3900,52 @@ void R_LoadLightGrid( lump_t *l )

if ( l->filelen != w->numLightGridPoints * sizeof( dgridPoint_t ) )
{
Log::Warn("light grid mismatch" );
w->lightGridData1 = nullptr;
w->lightGridData2 = nullptr;
Log::Warn("light grid mismatch, default light grid used\n" );

// generate default 1x1x1 light grid
w->lightGridSize[ 0 ] = 100000.0f;
w->lightGridSize[ 1 ] = 100000.0f;
w->lightGridSize[ 2 ] = 100000.0f;
w->lightGridInverseSize[ 0 ] = 1.0f / w->lightGridSize[ 0 ];
w->lightGridInverseSize[ 1 ] = 1.0f / w->lightGridSize[ 1 ];
w->lightGridInverseSize[ 2 ] = 1.0f / w->lightGridSize[ 2 ];

VectorSet( w->lightGridOrigin, 0.0f, 0.0f, 0.0f );

VectorMA( w->lightGridOrigin, -0.5f, w->lightGridSize,
w->lightGridGLOrigin );

VectorSet( w->lightGridBounds, 1, 1, 1 );

w->lightGridGLScale[ 0 ] = w->lightGridInverseSize[ 0 ];
w->lightGridGLScale[ 1 ] = w->lightGridInverseSize[ 1 ];
w->lightGridGLScale[ 2 ] = w->lightGridInverseSize[ 2 ];

gridPoint1 = (bspGridPoint1_t *) ri.Hunk_Alloc( sizeof( *gridPoint1 ) + sizeof( *gridPoint2 ), ha_pref::h_low );
gridPoint2 = (bspGridPoint2_t *) (gridPoint1 + w->numLightGridPoints);

// default some white light from above
gridPoint1->ambient[ 0 ] = 32;
gridPoint1->ambient[ 1 ] = 32;
gridPoint1->ambient[ 2 ] = 32;
gridPoint2->directed[ 0 ] = 96;
gridPoint2->directed[ 1 ] = 96;
gridPoint2->directed[ 2 ] = 96;
gridPoint1->lightVecX = 128;
gridPoint2->lightVecY = 128;

w->lightGridData1 = gridPoint1;
w->lightGridData2 = gridPoint2;

tr.lightGrid1Image = R_Create3DImage("<lightGrid1>", (const byte *)w->lightGridData1,
w->lightGridBounds[ 0 ], w->lightGridBounds[ 1 ],
w->lightGridBounds[ 2 ], IF_NOPICMIP | IF_NOLIGHTSCALE | IF_NOCOMPRESSION,
filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_EDGE_CLAMP );
tr.lightGrid2Image = R_Create3DImage("<lightGrid2>", (const byte *)w->lightGridData2,
w->lightGridBounds[ 0 ], w->lightGridBounds[ 1 ],
w->lightGridBounds[ 2 ], IF_NOPICMIP | IF_NOLIGHTSCALE | IF_NOCOMPRESSION,
filterType_t::FT_LINEAR, wrapTypeEnum_t::WT_EDGE_CLAMP );

return;
}

Expand Down

0 comments on commit 8eb0659

Please sign in to comment.