Merge branch 'master' into dijkstra-test
This commit is contained in:
commit
7e91642eb7
@ -25,7 +25,7 @@
|
||||
against the computer or your friends, and more!
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">http://supertuxkart.sourceforge.net/</url>
|
||||
<url type="homepage">http://supertuxkart.net/</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">http://supertuxkart.sourceforge.net/persistent/images/4/4e/Supertuxkart-0.9-screenshot-2.jpg</screenshot>
|
||||
<screenshot>http://supertuxkart.sourceforge.net/persistent/images/a/a9/Supertuxkart-0.9-screenshot-1.jpg</screenshot>
|
||||
|
@ -12,7 +12,7 @@ Coding style
|
||||
============
|
||||
|
||||
The coding style used in Super Tux Kart can be found at
|
||||
http://supertuxkart.sourceforge.net/Coding_Style
|
||||
http://supertuxkart.net/Coding_Style
|
||||
|
||||
|
||||
Documentation line length
|
||||
|
@ -354,17 +354,6 @@ void STKConfig::getAllData(const XMLNode * root)
|
||||
|
||||
}
|
||||
|
||||
if(const XMLNode *font_node = root->getNode("font"))
|
||||
{
|
||||
font_node->get("default", &m_font_default );
|
||||
font_node->get("default_fallback", &m_font_default_fallback);
|
||||
font_node->get("cjk", &m_font_cjk );
|
||||
font_node->get("ar", &m_font_ar );
|
||||
font_node->get("bold", &m_font_bold );
|
||||
font_node->get("bold_fallback", &m_font_bold_fallback );
|
||||
font_node->get("digit", &m_font_digit );
|
||||
}
|
||||
|
||||
if (const XMLNode *fonts_list = root->getNode("fonts-list"))
|
||||
{
|
||||
fonts_list->get("normal-ttf", &m_normal_ttf);
|
||||
|
@ -145,14 +145,6 @@ public:
|
||||
|
||||
float m_cutscene_fov;
|
||||
|
||||
/** File names of the default fonts in STK. */
|
||||
std::string m_font_default;
|
||||
std::string m_font_default_fallback;
|
||||
std::string m_font_cjk;
|
||||
std::string m_font_ar;
|
||||
std::string m_font_bold;
|
||||
std::string m_font_bold_fallback;
|
||||
std::string m_font_digit;
|
||||
/** Lists of TTF files used in STK. */
|
||||
std::vector<std::string> m_normal_ttf;
|
||||
std::vector<std::string> m_digit_ttf;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "guiengine/skin.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
|
||||
#include <freetype/ftoutln.h>
|
||||
#include FT_OUTLINE_H
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
FontWithFace::FontWithFace(const std::string& name, FaceTTF* ttf)
|
||||
@ -145,10 +145,11 @@ void FontWithFace::insertGlyph(wchar_t c, const GlyphInfo& gi)
|
||||
font_manager->checkFTError(FT_Load_Glyph(cur_face, gi.glyph_index,
|
||||
FT_LOAD_DEFAULT), "loading a glyph");
|
||||
|
||||
if (dynamic_cast<BoldFace*>(this))
|
||||
if (dynamic_cast<BoldFace*>(this) != NULL)
|
||||
{
|
||||
// Embolden the outline of the glyph
|
||||
FT_Outline_Embolden(&(slot->outline), getDPI() * 2);
|
||||
font_manager->checkFTError(FT_Outline_Embolden(&(slot->outline),
|
||||
getDPI() * 2), "embolden a glyph");
|
||||
}
|
||||
|
||||
font_manager->checkFTError(FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL),
|
||||
@ -321,7 +322,7 @@ void FontWithFace::dumpGlyphPage()
|
||||
// ----------------------------------------------------------------------------
|
||||
void FontWithFace::setDPI()
|
||||
{
|
||||
// Get face dpi:
|
||||
// Set face dpi:
|
||||
// Font size is resolution-dependent.
|
||||
// Normal text will range from 0.8, in 640x* resolutions (won't scale
|
||||
// below that) to 1.0, in 1024x* resolutions, and linearly up
|
||||
@ -445,7 +446,7 @@ void FontWithFace::render(const core::stringw& text,
|
||||
FontSettings* font_settings,
|
||||
FontCharCollector* char_collector)
|
||||
{
|
||||
const bool is_bold_face = dynamic_cast<BoldFace*>(this);
|
||||
const bool is_bold_face = (dynamic_cast<BoldFace*>(this) != NULL);
|
||||
const bool black_border = font_settings ?
|
||||
font_settings->useBlackBorder() : false;
|
||||
const bool rtl = font_settings ? font_settings->isRTL() : false;
|
||||
@ -513,7 +514,7 @@ void FontWithFace::render(const core::stringw& text,
|
||||
if (c==L'\r' && text[i+1]==L'\n')
|
||||
c = text[++i];
|
||||
offset.Y += m_font_max_height * scale;
|
||||
offset.X = position.UpperLeftCorner.X;
|
||||
offset.X = float(position.UpperLeftCorner.X);
|
||||
if (hcenter)
|
||||
offset.X += (position.getWidth() - text_dimension.Width) >> 1;
|
||||
continue;
|
||||
|
@ -1602,11 +1602,6 @@ void IrrDriver::renderTransparent()
|
||||
return;
|
||||
|
||||
// Render displacement nodes
|
||||
irr_driver->getFBO(FBO_TMP1_WITH_DS).bind();
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
irr_driver->getFBO(FBO_DISPLACE).bind();
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
DisplaceProvider * const cb =
|
||||
(DisplaceProvider *)Shaders::getCallback(ES_DISPLACE);
|
||||
cb->update();
|
||||
@ -1623,7 +1618,11 @@ void IrrDriver::renderTransparent()
|
||||
glBindVertexArray(VAOManager::getInstance()->getVAO(video::EVT_2TCOORDS));
|
||||
// Generate displace mask
|
||||
// Use RTT_TMP4 as displace mask
|
||||
irr_driver->getFBO(FBO_TMP1_WITH_DS).bind();
|
||||
if (ListDisplacement::getInstance()->size() > 0)
|
||||
{
|
||||
irr_driver->getFBO(FBO_TMP1_WITH_DS).bind();
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
for (unsigned i = 0; i < ListDisplacement::getInstance()->size(); i++)
|
||||
{
|
||||
const GLMesh &mesh =
|
||||
@ -1650,7 +1649,11 @@ void IrrDriver::renderTransparent()
|
||||
(GLvoid *)mesh.vaoOffset, (int)mesh.vaoBaseVertex);
|
||||
}
|
||||
|
||||
irr_driver->getFBO(FBO_DISPLACE).bind();
|
||||
if (ListDisplacement::getInstance()->size() > 0)
|
||||
{
|
||||
irr_driver->getFBO(FBO_DISPLACE).bind();
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
if (!displaceTex)
|
||||
displaceTex = irr_driver->getTexture(FileManager::TEXTURE, "displace.png");
|
||||
for (unsigned i = 0; i < ListDisplacement::getInstance()->size(); i++)
|
||||
|
@ -657,8 +657,7 @@ PROFILER_POP_CPU_MARKER();
|
||||
while (reason != GL_ALREADY_SIGNALED)
|
||||
{
|
||||
if (reason == GL_WAIT_FAILED) break;
|
||||
StkTime::sleep(1);
|
||||
reason = glClientWaitSync(m_sync, GL_SYNC_FLUSH_COMMANDS_BIT, 0);
|
||||
reason = glClientWaitSync(m_sync, GL_SYNC_FLUSH_COMMANDS_BIT, 1000000);
|
||||
}
|
||||
glDeleteSync(m_sync);
|
||||
PROFILER_POP_CPU_MARKER();
|
||||
|
@ -592,7 +592,7 @@ void cmdLineHelp()
|
||||
" --shadows=n Set shadow quality (0 to disable shadows).\n"
|
||||
"\n"
|
||||
"You can visit SuperTuxKart's homepage at "
|
||||
"http://supertuxkart.sourceforge.net\n\n",
|
||||
"http://supertuxkart.net\n\n",
|
||||
CommandLine::getExecName().c_str()
|
||||
);
|
||||
} // cmdLineHelp
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Automate the build process on Linux based on
|
||||
# http://supertuxkart.sourceforge.net/Build_STK_on_Linux
|
||||
# http://supertuxkart.net/Build_STK_on_Linux
|
||||
|
||||
# CMake build type
|
||||
BUILDTYPE=Debug
|
||||
|
Loading…
Reference in New Issue
Block a user