Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -rdu aquaria/Aquaria/Main.cpp /media/Lexar/aquaria/Aquaria/Main.cpp
- --- aquaria/Aquaria/Main.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/Aquaria/Main.cpp 2012-02-11 12:57:48.000000000 +0100
- @@ -80,7 +80,7 @@
- #else
- - extern "C" int main(int argc,char *argv[])
- + int main(int argc,char *argv[])
- {
- std::string dsqParam = ""; // fileSystem
- diff -rdu aquaria/Aquaria/SceneEditor.cpp /media/Lexar/aquaria/Aquaria/SceneEditor.cpp
- --- aquaria/Aquaria/SceneEditor.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/Aquaria/SceneEditor.cpp 2012-02-11 12:59:12.000000000 +0100
- @@ -3739,7 +3739,7 @@
- case ES_SCALING:
- {
- bool right=false, middle=false, down=false, uni=false;
- - bool noSide = 0;
- + unsigned char noSide = 0;
- if (cursorOffset.x > oldPosition.x+10)
- right = true;
- else if (cursorOffset.x < oldPosition.x-10)
- diff -rdu aquaria/BBGE/ActionMapper.cpp /media/Lexar/aquaria/BBGE/ActionMapper.cpp
- --- aquaria/BBGE/ActionMapper.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/BBGE/ActionMapper.cpp 2012-02-11 14:05:37.000000000 +0100
- @@ -75,9 +75,9 @@
- ActionData *ActionMapper::getActionDataByID(int actionID)
- {
- - for (ActionDataSet::iterator i = actionData.begin(); i != actionData.end(); i++)
- + for (ActionDataSet::iterator i = actionData.begin(); i != actionData.end(); ++i)
- {
- - if ((*i).id == actionID)
- + if (i->id == actionID)
- return &(*i);
- }
- return 0;
- @@ -382,30 +382,30 @@
- {
- ButtonList::iterator j;
- j = i->buttonList.begin();
- - for (; j != i->buttonList.end(); j++)
- + for (; j != i->buttonList.end(); ++j)
- {
- - int k = (*j);
- + const int k = (*j);
- int keyState=false;
- //joystick
- keyState = getKeyState(k);
- if (keyState != oldKeyDownMap[k])
- - {
- + {
- keyDownMap[k] = keyState;
- if (inputEnabled)
- {
- - ActionData *ad = &(*i);
- - if (ad->event)
- + const ActionData& ad = *i;
- + if (ad.event)
- {
- - if (ad->state==-1 || keyState == ad->state)
- + if (ad.state==-1 || keyState == ad.state)
- {
- - ad->event->act();
- + ad.event->act();
- }
- }
- else
- {
- - action(ad->id, keyState);
- + action(ad.id, keyState);
- }
- if (core->loopDone) goto out;
- }
- diff -rdu aquaria/BBGE/Core.cpp /media/Lexar/aquaria/BBGE/Core.cpp
- --- aquaria/BBGE/Core.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/BBGE/Core.cpp 2012-02-11 01:08:42.000000000 +0100
- @@ -1041,10 +1041,7 @@
- hWnd = 0;
- #endif
- - for (int i = 0; i < KEY_MAXARRAY; i++)
- - {
- - keys[i] = 0;
- - }
- + std::fill(keys, keys + KEY_MAXARRAY, 0);
- aspect = (aspectX/aspectY);//320.0f/240.0f;
- //1.3333334f;
- @@ -1353,26 +1350,23 @@
- bool Core::getKeyState(int k)
- {
- -#ifdef BBGE_BUILD_GLFW
- +#if defined(BBGE_BUILD_GLFW)
- return glfwGetKey(k)==GLFW_PRESS;
- -#endif
- -
- -#ifdef BBGE_BUILD_SDL
- +#elif defined(BBGE_BUILD_SDL)
- if (k >= KEY_MAXARRAY || k < 0)
- {
- return 0;
- }
- return keys[k];
- -#endif
- -
- -#ifdef BBGE_BUILD_WINDOWS
- +#elif defined(BBGE_BUILD_WINDOWS)
- if (k >= KEY_MAXARRAY || k < 0)
- {
- return 0;
- }
- return keys[k];
- +#else
- +#error "No BBGE_BUILD type defined"
- #endif
- -
- return 0;
- }
- @@ -1524,7 +1518,7 @@
- HRESULT hr;
- BYTE diks[256];
- // Get the input's device state, and put the state in dims
- - ZeroMemory( diks, sizeof(diks) );
- + std::fill(diks, sizeof(diks) / sizeof(diks[0]), 0);
- hr = g_pKeyboard->GetDeviceState( sizeof(diks), diks );
- if( FAILED(hr) )
- {
- diff -rdu aquaria/BBGE/Joystick.cpp /media/Lexar/aquaria/BBGE/Joystick.cpp
- --- aquaria/BBGE/Joystick.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/BBGE/Joystick.cpp 2012-02-11 14:00:16.000000000 +0100
- @@ -20,6 +20,10 @@
- */
- #include "Core.h"
- +#ifdef __LINUX__
- +#include <unistd.h>
- +#endif
- +
- #if defined(BBGE_BUILD_WINDOWS) && defined(BBGE_BUILD_XINPUT)
- #include "Xinput.h"
- @@ -47,9 +51,6 @@
- }
- */
- -
- -
- -
- bool tryXInput()
- {
- __try
- diff -rdu aquaria/BBGE/Texture.cpp /media/Lexar/aquaria/BBGE/Texture.cpp
- --- aquaria/BBGE/Texture.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/BBGE/Texture.cpp 2012-02-11 14:07:08.000000000 +0100
- @@ -327,7 +327,7 @@
- size_t pos = file.find_last_of('.');
- - if ((pos != std::string::npos) && (pos >= 0))
- + if (pos != std::string::npos)
- {
- // make sure this didn't catch the '.' in /home/username/.Aquaria/* --ryan.
- const std::string userdata = core->getUserDataFolder();
- diff -rdu aquaria/BBGE/Vector.h /media/Lexar/aquaria/BBGE/Vector.h
- --- aquaria/BBGE/Vector.h 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/BBGE/Vector.h 2012-02-11 12:56:08.000000000 +0100
- @@ -64,25 +64,25 @@
- }
- // vecector equality
- - const bool operator==(const Vector &vec) const
- + bool operator==(const Vector &vec) const
- {
- return ((x == vec.x) && (y == vec.y) && (z == vec.z));
- }
- // vecector inequality
- - const bool operator!=(const Vector &vec) const
- + bool operator!=(const Vector &vec) const
- {
- return !(*this == vec);
- }
- // vector add
- - const Vector operator+(const Vector &vec) const
- + Vector operator+(const Vector &vec) const
- {
- return Vector(x + vec.x, y + vec.y, z + vec.z);
- }
- // vector add (opposite of negation)
- - const Vector operator+() const
- + Vector operator+() const
- {
- return Vector(*this);
- }
- @@ -96,13 +96,13 @@
- }
- // vector subtraction
- - const Vector operator-(const Vector& vec) const
- + Vector operator-(const Vector& vec) const
- {
- return Vector(x - vec.x, y - vec.y, z - vec.z);
- }
- // vector negation
- - const Vector operator-() const
- + Vector operator-() const
- {
- return Vector(-x, -y, -z);
- }
- @@ -112,7 +112,7 @@
- }
- // vector decrement
- - const Vector &operator-=(const Vector& vec)
- + Vector &operator-=(const Vector& vec)
- {
- x -= vec.x;
- y -= vec.y;
- @@ -122,7 +122,7 @@
- }
- // scalar self-multiply
- - const Vector &operator*=(const scalar_t &s)
- + Vector &operator*=(const scalar_t &s)
- {
- x *= s;
- y *= s;
- @@ -132,7 +132,7 @@
- }
- // scalar self-divecide
- - const Vector &operator/=(const scalar_t &s)
- + Vector &operator/=(const scalar_t &s)
- {
- const float recip = 1/s; // for speed, one divecision
- @@ -144,7 +144,7 @@
- }
- // vector self-divide
- - const Vector &operator/=(const Vector &v)
- + Vector &operator/=(const Vector &v)
- {
- x /= v.x;
- y /= v.y;
- @@ -153,7 +153,7 @@
- return *this;
- }
- - const Vector &operator*=(const Vector &v)
- + Vector &operator*=(const Vector &v)
- {
- x *= v.x;
- y *= v.y;
- @@ -164,19 +164,19 @@
- // post multiply by scalar
- - const Vector operator*(const scalar_t &s) const
- + Vector operator*(const scalar_t &s) const
- {
- return Vector(x*s, y*s, z*s);
- }
- // post multiply by Vector
- - const Vector operator*(const Vector &v) const
- + Vector operator*(const Vector &v) const
- {
- return Vector(x*v.x, y*v.y, z*v.z);
- }
- // pre multiply by scalar
- - friend inline const Vector operator*(const scalar_t &s, const Vector &vec)
- + friend inline Vector operator*(const scalar_t &s, const Vector &vec)
- {
- return vec*s;
- }
- @@ -187,7 +187,7 @@
- }
- */
- // divecide by scalar
- - const Vector operator/(scalar_t s) const
- + Vector operator/(scalar_t s) const
- {
- s = 1/s;
- @@ -196,7 +196,7 @@
- // cross product
- - const Vector CrossProduct(const Vector &vec) const
- + Vector CrossProduct(const Vector &vec) const
- {
- return Vector(y*vec.z - z*vec.y, z*vec.x - x*vec.z, x*vec.y - y*vec.x);
- }
- @@ -212,41 +212,41 @@
- }
- // cross product
- - const Vector operator^(const Vector &vec) const
- + Vector operator^(const Vector &vec) const
- {
- return Vector(y*vec.z - z*vec.y, z*vec.x - x*vec.z, x*vec.y - y*vec.x);
- }
- // dot product
- - const scalar_t inline dot(const Vector &vec) const
- + scalar_t inline dot(const Vector &vec) const
- {
- return x*vec.x + y*vec.y + z*vec.z;
- }
- - const scalar_t inline dot2D(const Vector &vec) const
- + scalar_t inline dot2D(const Vector &vec) const
- {
- return x*vec.x + y*vec.y;
- }
- // dot product
- - const scalar_t operator%(const Vector &vec) const
- + scalar_t operator%(const Vector &vec) const
- {
- return x*vec.x + y*vec.x + z*vec.z;
- }
- // length of vector
- - const scalar_t inline getLength3D() const
- + scalar_t inline getLength3D() const
- {
- return (scalar_t)sqrtf(x*x + y*y + z*z);
- }
- - const scalar_t inline getLength2D() const
- + scalar_t inline getLength2D() const
- {
- return (scalar_t)sqrtf(x*x + y*y);
- }
- // return the unit vector
- - const Vector inline unitVector3D() const
- + Vector inline unitVector3D() const
- {
- return (*this) * (1/getLength3D());
- }
- @@ -277,7 +277,7 @@
- }
- }
- - const scalar_t operator!() const
- + scalar_t operator!() const
- {
- return sqrtf(x*x + y*y + z*z);
- }
- @@ -328,7 +328,7 @@
- }
- // return angle between two vectors
- - const float inline Angle(const Vector& normal) const
- + float inline Angle(const Vector& normal) const
- {
- return acosf(*this % normal);
- }
- @@ -345,7 +345,7 @@
- const scalar_t inline getCheatLength3D() const;
- */
- - const bool inline isLength2DIn(float radius) const
- + bool inline isLength2DIn(float radius) const
- {
- return (x*x + y*y) <= (radius*radius);
- }
- @@ -359,20 +359,20 @@
- }
- */
- - const void inline setZero()
- + void inline setZero()
- {
- this->x = this->y = this->z = 0;
- }
- - const float inline getSquaredLength2D() const
- + float inline getSquaredLength2D() const
- {
- return (x*x) + (y*y);
- }
- - const bool inline isZero() const
- + bool inline isZero() const
- {
- return x==0 && y==0 && z==0;
- }
- - const bool inline isNan() const
- + bool inline isNan() const
- {
- #ifdef BBGE_BUILD_WINDOWS
- return _isnan(x) || _isnan(y) || _isnan(z);
- @@ -396,7 +396,7 @@
- }
- #ifdef BBGE_BUILD_DIRECTX
- - const D3DCOLOR getD3DColor(float alpha)
- + D3DCOLOR getD3DColor(float alpha)
- {
- return D3DCOLOR_RGBA(int(x*255), int(y*255), int(z*255), int(alpha*255));
- }
- diff -rdu aquaria/CMakeLists.txt /media/Lexar/aquaria/CMakeLists.txt
- --- aquaria/CMakeLists.txt 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/CMakeLists.txt 2012-02-11 14:18:41.000000000 +0100
- @@ -16,6 +16,19 @@
- OPTION(AQUARIA_NO_CONSOLE "No console window?" FALSE)
- ENDIF(WIN32)
- +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -fomit-frame-pointer")
- +SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
- +if (CMAKE_CXX_COMPILER_ID STREQUAL "PathScale")
- + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -OPT:Olimit=0 -march=auto")
- + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -OPT:Olimit=0 -march=auto")
- +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
- + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -march=native")
- + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -march=native")
- +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- + SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
- + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")
- +endif()
- +
- # No Steamworks SDK for Linux at the moment. Roll our own achievements.
- ADD_DEFINITIONS(-DBBGE_BUILD_ACHIEVEMENTS_INTERNAL=1)
- diff -rdu aquaria/ExternalLibs/FTGL/include/FTCharToGlyphIndexMap.h /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTCharToGlyphIndexMap.h
- --- aquaria/ExternalLibs/FTGL/include/FTCharToGlyphIndexMap.h 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTCharToGlyphIndexMap.h 2012-02-11 13:02:00.000000000 +0100
- @@ -71,7 +71,7 @@
- }
- }
- - const GlyphIndex find( CharacterCode c)
- + GlyphIndex find( CharacterCode c)
- {
- if( !this->Indices)
- {
- diff -rdu aquaria/ExternalLibs/FTGL/include/FTGlyphContainer.h /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTGlyphContainer.h
- --- aquaria/ExternalLibs/FTGL/include/FTGlyphContainer.h 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTGlyphContainer.h 2012-02-11 13:02:56.000000000 +0100
- @@ -68,7 +68,7 @@
- * @return An FTGlyph or <code>null</code> is it hasn't been
- * loaded.
- */
- - const FTGlyph* const Glyph( const unsigned int characterCode) const;
- + const FTGlyph* Glyph( const unsigned int characterCode) const;
- /**
- * Get the bounding box for a character.
- diff -rdu aquaria/ExternalLibs/FTGL/include/FTLibrary.h /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTLibrary.h
- --- aquaria/ExternalLibs/FTGL/include/FTLibrary.h 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/ExternalLibs/FTGL/include/FTLibrary.h 2012-02-11 13:02:38.000000000 +0100
- @@ -41,7 +41,7 @@
- *
- * @return A handle to a FreeType library instance.
- */
- - const FT_Library* const GetLibrary() const { return library;}
- + const FT_Library* GetLibrary() const { return library;}
- /**
- * Queries the library for errors.
- diff -rdu aquaria/ExternalLibs/FTGL/src/FTGlyphContainer.cpp /media/Lexar/aquaria/ExternalLibs/FTGL/src/FTGlyphContainer.cpp
- --- aquaria/ExternalLibs/FTGL/src/FTGlyphContainer.cpp 2012-02-11 14:17:52.000000000 +0100
- +++ /media/Lexar/aquaria/ExternalLibs/FTGL/src/FTGlyphContainer.cpp 2012-02-11 13:04:12.000000000 +0100
- @@ -47,7 +47,7 @@
- }
- -const FTGlyph* const FTGlyphContainer::Glyph( const unsigned int characterCode) const
- +const FTGlyph* FTGlyphContainer::Glyph( const unsigned int characterCode) const
- {
- signed int index = charMap->GlyphListIndex( characterCode);
- return glyphs[index];
- Binary files aquaria/.hg/dirstate and /media/Lexar/aquaria/.hg/dirstate differ
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement