3ds Backend: - switch to shaderProgramUse Desktop Backend - Add Pre Alpha Text Input and Keyboard Support - Move Shader Attrib Setup into a function and callit every time we need a set up vbo - Move to Mat4 api Core: - Add fquat support - Add LoadFile2Str - Move Mat4 Lib from Project n73 to Palladium - Add full supprot for vec cross types - Add Normalize, Distance and Dot to all - Add Cross to vec3 Drivers: - Add a SetViewPort func to GFX - Add Keyboard keys and Flasg to Hid Image: - Add Vertical Flipping - Add Horizontal flipping UI7: - Fix Critical Bug in IO Viewport handler - Fix library list (error on MinGW for some reason) Lazyvec: - Split into multiple source files - Generate new functions (see core updates)
25 lines
686 B
C++
25 lines
686 B
C++
#include <lazyvec.hpp>
|
|
#include <unordered_set>
|
|
|
|
namespace LVec {
|
|
std::string MakeSwap(int n) {
|
|
std::stringstream s;
|
|
std::unordered_set<std::string> done;
|
|
for (int i = 0; i < n; i++) {
|
|
for (int j = 0; j < n; j++) {
|
|
std::string a = elems[i];
|
|
std::string b = elems[j];
|
|
/** Make sure we generate nothing twice */
|
|
if (a == b || done.count(b + a)) {
|
|
continue;
|
|
}
|
|
s << " void Swap" << (char)toupper(a[0]) << (char)toupper(b[0])
|
|
<< "() {\n";
|
|
s << " T t = " << a << ";\n " << a << " = " << b << ";\n";
|
|
s << " " << b << " = t;\n }\n";
|
|
done.insert(a + b);
|
|
}
|
|
}
|
|
return s.str();
|
|
}
|
|
} // namespace LVec
|