Merge remote-tracking branch 'origin/master' into game_protocol
This commit is contained in:
commit
c1a3d281f6
@ -143,38 +143,3 @@ you have to run:
|
||||
and then:
|
||||
|
||||
zipalign -v 4 SuperTuxKart-release-unsigned.apk SuperTuxKart-release.apk
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
KNOWN ISSUES
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
1. It's not possible to compile STK for Android < 4.4 due to missing GLES 3.0
|
||||
functions. It is technically possible to do - check GLES context version,
|
||||
load OpenGL functions dynamically using EGL, and if they are not loaded
|
||||
properly, then fallback to GLES 2.0.
|
||||
|
||||
2. It never ocurred for me, but it's possible that EGL context is lost in some
|
||||
cases. SuperTuxKart is not designed to re-create all textures at any moment,
|
||||
so this is a "Wontfix", at least for now.
|
||||
|
||||
3. We use "exit(0)" at the end of main function. We shouldn't do it and we
|
||||
should just return from the main function. But STK uses some global
|
||||
variables and their values are remembered when the game is restarted. We
|
||||
should properly clear them or re-initialize on startup. Using the "exit(0)"
|
||||
is not-that-bad workaround, but it may cause a crash on exit sometimes.
|
||||
It seems to affect only Android 5.0. More information about the crash:
|
||||
https://code.google.com/p/android/issues/detail?id=160824
|
||||
|
||||
4. STK crashes on startup on some devices when aarch64 build is made using
|
||||
Android r13 NDK. The r13 version has rather big modifications (it uses clang
|
||||
instead of gcc by default). This is probably a bug in NDK/compiler/OS, but
|
||||
for this reason using NDK r12 for 64-bit arm compilation is preferred.
|
||||
|
||||
5. Angelscript doesn't have full support for aarch64 builds, so that scripting
|
||||
won't work on this platform.
|
||||
|
||||
6. Turning left/right using accelerometer is available, but at this stage the
|
||||
default screen orientation is not automatically detected and user must
|
||||
manually choose if he needs "phone" or "tablet" accelerometer.
|
||||
|
@ -321,7 +321,7 @@ core::stringc ListUserConfigParam<T, U>::toString() const
|
||||
return "";
|
||||
} // toString
|
||||
|
||||
// ============================================================================
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
const char* comment)
|
||||
@ -331,7 +331,7 @@ MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
if (comment != NULL) m_comment = comment;
|
||||
} // MapUserConfigParam
|
||||
|
||||
// ============================================================================
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
const char* comment,
|
||||
@ -345,7 +345,7 @@ MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
// add the default list
|
||||
va_list arguments;
|
||||
va_start(arguments, nb_elements);
|
||||
|
||||
|
||||
struct pair_type { T key; U value; };
|
||||
|
||||
for (int i = 0; i < nb_elements; i++)
|
||||
@ -356,7 +356,7 @@ MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
va_end(arguments); // Cleans up the list
|
||||
} // MapUserConfigParam
|
||||
|
||||
// ============================================================================
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
GroupUserConfigParam* group,
|
||||
@ -367,7 +367,7 @@ MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
if (comment != NULL) m_comment = comment;
|
||||
} // MapUserConfigParam
|
||||
|
||||
// ============================================================================
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
GroupUserConfigParam* group,
|
||||
@ -382,30 +382,25 @@ MapUserConfigParam<T, U>::MapUserConfigParam(const char* param_name,
|
||||
// add the default list
|
||||
va_list arguments;
|
||||
va_start(arguments, nb_elements);
|
||||
|
||||
|
||||
struct pair_type { T key; U value; };
|
||||
|
||||
for (int i = 0; i < nb_elements; i++) {
|
||||
for (int i = 0; i < nb_elements; i++)
|
||||
{
|
||||
pair_type key_value_pair = va_arg(arguments, pair_type);
|
||||
m_elements.insert(std::pair<T, U>(key_value_pair.key, key_value_pair.value));
|
||||
}
|
||||
va_end(arguments); // Cleans up the list
|
||||
} // MapUserConfigParam
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
void MapUserConfigParam<T, U>::write(std::ofstream& stream) const
|
||||
{
|
||||
const int elts_amount = m_elements.size();
|
||||
|
||||
// comment
|
||||
if (m_comment.size() > 0) stream << " <!-- " << m_comment.c_str();
|
||||
stream << " -->\n <" << m_param_name.c_str() << "\n";
|
||||
|
||||
stream << " Size=\"" << elts_amount << "\"\n";
|
||||
// actual elements
|
||||
//for (int n = 0; n<elts_amount; n++)
|
||||
|
||||
for (const auto& kv : m_elements)
|
||||
{
|
||||
stream << " " << kv.first << "=\"" << kv.second << "\"\n";
|
||||
@ -414,7 +409,7 @@ void MapUserConfigParam<T, U>::write(std::ofstream& stream) const
|
||||
stream << " </" << m_param_name.c_str() << ">\n\n";
|
||||
} // write
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
template<typename T, typename U>
|
||||
void MapUserConfigParam<T, U>::findYourDataInAChildOf(const XMLNode* node)
|
||||
@ -425,56 +420,30 @@ void MapUserConfigParam<T, U>::findYourDataInAChildOf(const XMLNode* node)
|
||||
//Log::error("User Config", "Couldn't find parameter group %s", m_param_name.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
int attr_count = 0;
|
||||
child->get("Size", &attr_count);
|
||||
|
||||
for (const auto& kv : m_elements)
|
||||
{
|
||||
std::pair<T,U> elt;
|
||||
elt.first = kv.first;
|
||||
elt.second = kv.second;
|
||||
|
||||
|
||||
bool there = false;
|
||||
|
||||
for (const auto& kvRHS : m_elements)
|
||||
{
|
||||
if (elt.second == kvRHS.second)
|
||||
{
|
||||
there = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!there)
|
||||
{
|
||||
m_elements.insert(elt);
|
||||
}
|
||||
}
|
||||
child->get(&m_elements);
|
||||
} // findYourDataInAChildOf
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
void MapUserConfigParam<T, U>::findYourDataInAnAttributeOf(const XMLNode* node)
|
||||
{
|
||||
} // findYourDataInAnAttributeOf
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
void MapUserConfigParam<T, U>::addElement(T element, U value)
|
||||
{
|
||||
m_elements[element] = value;
|
||||
} // findYourDataInAnAttributeOf
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------------
|
||||
template<typename T, typename U>
|
||||
core::stringc MapUserConfigParam<T, U>::toString() const
|
||||
{
|
||||
return "";
|
||||
} // toString
|
||||
|
||||
// ============================================================================
|
||||
// ----------------------------------------------------------------------------
|
||||
IntUserConfigParam::IntUserConfigParam(int default_value,
|
||||
const char* param_name,
|
||||
const char* comment)
|
||||
|
@ -166,7 +166,6 @@ void SolidCommandBuffer::fill(MeshMap *mesh_map)
|
||||
|
||||
fillInstanceData<InstanceDataFourTex, MeshMap>
|
||||
(mesh_map, four_tex_material_list, InstanceTypeFourTex);
|
||||
|
||||
if (!CVS->supportsAsyncInstanceUpload())
|
||||
glUnmapBuffer(GL_DRAW_INDIRECT_BUFFER);
|
||||
} //SolidCommandBuffer::fill
|
||||
|
@ -218,7 +218,6 @@ protected:
|
||||
mesh_map,
|
||||
instance_buffer);
|
||||
}
|
||||
|
||||
if (!CVS->supportsAsyncInstanceUpload())
|
||||
{
|
||||
glUnmapBuffer(GL_ARRAY_BUFFER);
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "io/file_manager.hpp"
|
||||
#include "io/xml_node.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "utils/interpolation_array.hpp"
|
||||
#include "utils/vec3.hpp"
|
||||
|
||||
|
@ -33,9 +33,11 @@ using namespace irr;
|
||||
|
||||
#include "utils/leak_check.hpp"
|
||||
#include "utils/no_copy.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
#include "utils/time.hpp"
|
||||
#include "utils/types.hpp"
|
||||
|
||||
|
||||
class InterpolationArray;
|
||||
class Vec3;
|
||||
|
||||
@ -95,6 +97,27 @@ public:
|
||||
int getHPR(core::vector3df *value) const;
|
||||
int getHPR(Vec3 *value) const;
|
||||
|
||||
template<typename T, typename U>
|
||||
int get(std::map<T, U>* out_map) const
|
||||
{
|
||||
using namespace StringUtils;
|
||||
for (auto& p : m_attributes)
|
||||
{
|
||||
T val_1;
|
||||
if (!fromString(p.first, val_1))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
U val_2;
|
||||
if (!fromString(wideToUtf8(p.second), val_2))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
(*out_map)[val_1] = val_2;
|
||||
}
|
||||
return (int)m_attributes.size();
|
||||
}
|
||||
|
||||
bool hasChildNamed(const char* name) const;
|
||||
|
||||
/** Handy functions to test the bit pattern returned by get(vector3df*).*/
|
||||
|
@ -115,7 +115,7 @@ void Log::resetTerminalColor()
|
||||
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),
|
||||
/*TERM_BLACK*/0 << 4 | /*TERM_LIGHTGRAY*/7);
|
||||
#else
|
||||
printf("%c[0;;m\n", 0x1B);
|
||||
printf("%c[0;;m", 0x1B);
|
||||
#endif
|
||||
} // resetTerminalColor
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user