Skip to content

Commit

Permalink
Merge pull request #84 from RoboCup-SSL/fix-utf
Browse files Browse the repository at this point in the history
Fix utf
  • Loading branch information
mahi97 authored Jan 5, 2019
2 parents 21a730b + bf66733 commit 7759f0b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap cartr/qt4 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap-pin cartr/qt4 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt@4 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install [email protected] ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ode --with-double-precision ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall --ignore-dependencies python ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install protobuf ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew tap robotology/formulae ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install robotology/formulae/ode ; fi

install:
# vartypes
Expand All @@ -50,4 +52,4 @@ script:
- mkdir build && cd build
- cmake ..
- make
- sudo make install
- sudo make install
6 changes: 6 additions & 0 deletions include/configwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ using namespace VarTypes;
#define DEF_VALUE(type,Type,name) \
std::shared_ptr<VarTypes::Var##Type> v_##name; \
inline type name() {return v_##name->get##Type();}

#define DEF_FIELD_VALUE(type,Type,name) \
std::shared_ptr<VarTypes::Var##Type> v_DivA_##name; \
std::shared_ptr<VarTypes::Var##Type> v_DivB_##name; \
inline type name() {return (Division() == "Division A" ? v_DivA_##name: v_DivB_##name)->get##Type(); }


#define DEF_ENUM(type,name) \
std::shared_ptr<VarTypes::VarStringEnum> v_##name; \
type name() {if(v_##name!=nullptr) return v_##name->getString();return * (new type);}
Expand Down
6 changes: 4 additions & 2 deletions src/graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,14 @@ void CGraphics::initScene(int width,int height,dReal rc,dReal gc,dReal bc,bool f
glLightfv (GL_LIGHT0, GL_POSITION, light_position);

if (fog) {
GLfloat fogColor [4] = {fogr,fogg,fogb,1};
GLfloat fogColor [4] = {static_cast<GLfloat>(fogr),
static_cast<GLfloat>(fogg),
static_cast<GLfloat>(fogb), 1};
glFogi (GL_FOG_MODE, GL_EXP2); //set the fog mode to GL_EXP2
glFogf(GL_FOG_START,5);
glFogf(GL_FOG_END,10);
glFogfv (GL_FOG_COLOR, fogColor); //set the fog color to our color chosen above
glFogf (GL_FOG_DENSITY, fogdensity); //set the density to the value above
glFogf (GL_FOG_DENSITY, static_cast<GLfloat>(fogdensity)); //set the density to the value above
//glHint (GL_FOG_HINT, GL_NICEST); // set the fog to look the nicest, may slow down on older cards
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Copyright (C) 2011, Parsian Robotic Center (eew.aut.ac.ir/~parsian/grsim)

int main(int argc, char *argv[])
{
std::locale::global( std::locale( "" ) );

char** argend = argc + argv;

QCoreApplication::setOrganizationName("Parsian");
Expand Down

0 comments on commit 7759f0b

Please sign in to comment.