tahoma2d/toonz/sources/toonzlib/sandor_fxs/toonz4_6staff.cpp

50 lines
1.1 KiB
C++
Raw Normal View History

2016-03-19 06:57:51 +13:00
#include "toonz4_6staff.h"
#include "trop.h"
#include "tconvert.h"
#include "toonz4.6/toonz.h"
2016-04-15 17:11:23 +12:00
#ifdef _WIN32
2016-03-19 06:57:51 +13:00
#pragma warning(disable : 4996)
#endif
//---------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
int isTTT(const char *fn) {
int ln, i;
char lfn[1024];
strcpy(lfn, fn);
ln = strlen(lfn);
for (i = ln - 1; i >= 0; i--)
if (lfn[i] == ' ') {
lfn[i] = '\0';
} else
break;
ln = strlen(lfn);
if (toupper(lfn[ln - 1]) == (int)'T' && toupper(lfn[ln - 2]) == (int)'T' &&
toupper(lfn[ln - 3]) == (int)'T')
return 1;
return 0;
2016-03-19 06:57:51 +13:00
}
//-----------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
const char *strsave(const char *t) {
char *s;
s = (char *)malloc(strlen(t) + 1);
strcpy(s, t);
return s;
2016-03-19 06:57:51 +13:00
}
//-----------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
void convertParam(double param[], const char *cParam[], int cParamLen) {
std::string app;
for (int i = 1; i < 12; i++) {
app = std::to_string(param[i]);
cParam[i] = strsave(app.c_str());
}
2016-03-19 06:57:51 +13:00
}
//-----------------------------------------------------------------------