Replaced placeholders for GTK Radiant texture def

This commit is contained in:
_ 2017-08-19 05:45:58 -07:00
parent 3e7dd36db3
commit e9d88f57d9
2 changed files with 14 additions and 1 deletions

View File

@ -7,6 +7,17 @@
#define Z 2
using namespace std;
std::string texdef_gtk(const TPlanePoints & b) {
std::stringstream ss;
ss << " " << b.hshift
<< " " << b.vshift
<< " " << b.rotation
<< " " << b.hscale
<< " " << b.vscale;
return " 0 0 0 0.500000 0.500000";
}
// e.g GTK Radiant or older level editors.
void brushdef_gtk(std::stringstream &x, const vector<TPlanePoints> &y) {
if(y.size())
@ -19,7 +30,7 @@ void brushdef_gtk(std::stringstream &x, const vector<TPlanePoints> &y) {
x << "( " << krPlane.m_C[X] << " " << krPlane.m_C[Z] << " " << krPlane.m_C[Y] << " ) ";
if(krPlane.m_material.length())
{
x << krPlane.m_material << " 0 0 0 0.500000 0.500000" << std::endl;
x << krPlane.m_material << texdef_gtk(krPlane) << std::endl;
}
else
{

View File

@ -7,6 +7,8 @@
#include "worldspawn.h"
#include "planes.h"
std::string texdef_gtk(const TPlanePoints&);
std::string texdef_net(const TPlanePoints&);
void brushdef_gtk(std::stringstream&, const std::vector<TPlanePoints>&);