diff --git a/Makefile b/Makefile index 80a4b0f..42daa5a 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ include $(DEVKITPRO)/wut/share/wut_rules # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files #------------------------------------------------------------------------------- -TARGET := launchiine +TARGET := men BUILD := build SOURCES := src \ src/fs \ diff --git a/src/Application.cpp b/src/Application.cpp index 0e7b590..3fd94ac 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -31,22 +31,12 @@ #include "utils/AsyncExecutor.h" #include -#define HBL_TITLE_ID (0x0005000013374842) -#define MII_MAKER_JPN_TITLE_ID (0x000500101004A000) -#define MII_MAKER_USA_TITLE_ID (0x000500101004A100) -#define MII_MAKER_EUR_TITLE_ID (0x000500101004A200) - -Application *Application::applicationInstance = NULL; +Application *Application::applicationInstance = nullptr; bool Application::exitApplication = false; bool Application::quitRequest = false; Application::Application() - : CThread(CThread::eAttributeAffCore1 | CThread::eAttributePinnedAff, 0, 0x800000) - , bgMusic(NULL) - , video(NULL) - , mainWindow(NULL) - , fontSystem(NULL) - , exitCode(0) { + : CThread(CThread::eAttributeAffCore1 | CThread::eAttributePinnedAff, 0, 0x800000), bgMusic(nullptr), video(nullptr), mainWindow(nullptr), fontSystem(nullptr), exitCode(0) { controller[0] = new VPadController(GuiTrigger::CHANNEL_1); controller[1] = new WPadController(GuiTrigger::CHANNEL_2); controller[2] = new WPadController(GuiTrigger::CHANNEL_3); @@ -59,43 +49,30 @@ Application::Application() bgMusic->Play(); bgMusic->SetVolume(50); - AsyncExecutor::execute([] {DEBUG_FUNCTION_LINE("Hello\n");}); + AsyncExecutor::execute([] { DEBUG_FUNCTION_LINE("Hello"); }); exitApplication = false; - uint64_t titleID = OSGetTitleID(); - - // Homebrew Launcher does not like the standard ProcUI application loop, - // so instead we disable the home buttom menu and use the home button - // to trigger an exit. - if (titleID == HBL_TITLE_ID || - titleID == MII_MAKER_JPN_TITLE_ID || - titleID == MII_MAKER_USA_TITLE_ID || - titleID == MII_MAKER_EUR_TITLE_ID) { - // Important: OSEnableHomeButtonMenu must come before ProcUIInitEx. - OSEnableHomeButtonMenu(FALSE); - sFromHBL = TRUE; - } - ProcUIInit(OSSavesDone_ReadyToRelease); } Application::~Application() { - DEBUG_FUNCTION_LINE("Destroy music\n"); + DEBUG_FUNCTION_LINE("Destroy music"); delete bgMusic; - DEBUG_FUNCTION_LINE("Destroy controller\n"); + DEBUG_FUNCTION_LINE("Destroy controller"); - for(int32_t i = 0; i < 5; i++) - delete controller[i]; + for (auto &i: controller) { + delete i; + } - DEBUG_FUNCTION_LINE("Clear resources\n"); + DEBUG_FUNCTION_LINE("Clear resources"); Resources::Clear(); - DEBUG_FUNCTION_LINE("Stop sound handler\n"); + DEBUG_FUNCTION_LINE("Stop sound handler"); SoundHandler::DestroyInstance(); - DEBUG_FUNCTION_LINE("Clear AsyncExecutor\n"); + DEBUG_FUNCTION_LINE("Clear AsyncExecutor"); AsyncExecutor::destroyInstance(); ProcUIShutdown(); @@ -118,11 +95,11 @@ void Application::quit(int32_t code) { void Application::fadeOut() { GuiImage fadeOut(video->getTvWidth(), video->getTvHeight(), (GX2Color) { - 0, 0, 0, 255 + 0, 0, 0, 255 }); - for(int32_t i = 0; i < 255; i += 10) { - if(i > 255) + for (int32_t i = 0; i < 255; i += 10) { + if (i > 255) i = 255; fadeOut.setAlpha(i / 255.0f); @@ -155,79 +132,79 @@ void Application::fadeOut() { } } -bool Application::procUI(void) { +bool Application::procUI() { bool executeProcess = false; - switch(ProcUIProcessMessages(true)) { - case PROCUI_STATUS_EXITING: { - DEBUG_FUNCTION_LINE("PROCUI_STATUS_EXITING\n"); - exitCode = EXIT_SUCCESS; - exitApplication = true; - break; - } - case PROCUI_STATUS_RELEASE_FOREGROUND: { - DEBUG_FUNCTION_LINE("PROCUI_STATUS_RELEASE_FOREGROUND\n"); - if(video != NULL) { - // we can turn ofF the screen but we don't need to and it will display the last image - video->tvEnable(true); - video->drcEnable(true); - - DEBUG_FUNCTION_LINE("delete fontSystem\n"); - delete fontSystem; - fontSystem = NULL; - - DEBUG_FUNCTION_LINE("delete video\n"); - delete video; - video = NULL; - - DEBUG_FUNCTION_LINE("deinitialze memory\n"); - libgui_memoryRelease(); - ProcUIDrawDoneRelease(); - } else { - ProcUIDrawDoneRelease(); + switch (ProcUIProcessMessages(true)) { + case PROCUI_STATUS_EXITING: { + DEBUG_FUNCTION_LINE("PROCUI_STATUS_EXITING"); + exitCode = EXIT_SUCCESS; + exitApplication = true; + break; } - break; - } - case PROCUI_STATUS_IN_FOREGROUND: { - if(!quitRequest) { - if(video == NULL) { - DEBUG_FUNCTION_LINE("PROCUI_STATUS_IN_FOREGROUND\n"); - DEBUG_FUNCTION_LINE("initialze memory\n"); - libgui_memoryInitialize(); + case PROCUI_STATUS_RELEASE_FOREGROUND: { + DEBUG_FUNCTION_LINE("PROCUI_STATUS_RELEASE_FOREGROUND"); + if (video != nullptr) { + // we can turn ofF the screen but we don't need to and it will display the last image + video->tvEnable(true); + video->drcEnable(true); - DEBUG_FUNCTION_LINE("Initialize video\n"); - video = new CVideo(GX2_TV_SCAN_MODE_720P, GX2_DRC_RENDER_MODE_SINGLE); - DEBUG_FUNCTION_LINE("Video size %i x %i\n", video->getTvWidth(), video->getTvHeight()); + DEBUG_FUNCTION_LINE("delete fontSystem"); + delete fontSystem; + fontSystem = nullptr; - //! setup default Font - DEBUG_FUNCTION_LINE("Initialize main font system\n"); - FreeTypeGX *fontSystem = new FreeTypeGX(Resources::GetFile("font.ttf"), Resources::GetFileSize("font.ttf"), true); - GuiText::setPresetFont(fontSystem); - - if(mainWindow == NULL) { - DEBUG_FUNCTION_LINE("Initialize main window\n"); - mainWindow = new MainWindow(video->getTvWidth(), video->getTvHeight()); - } + DEBUG_FUNCTION_LINE("delete video"); + delete video; + video = nullptr; + DEBUG_FUNCTION_LINE("deinitialze memory"); + libgui_memoryRelease(); + ProcUIDrawDoneRelease(); + } else { + ProcUIDrawDoneRelease(); } - executeProcess = true; + break; } - break; - } - case PROCUI_STATUS_IN_BACKGROUND: - default: - break; + case PROCUI_STATUS_IN_FOREGROUND: { + if (!quitRequest) { + if (video == nullptr) { + DEBUG_FUNCTION_LINE("PROCUI_STATUS_IN_FOREGROUND"); + DEBUG_FUNCTION_LINE("initialze memory"); + libgui_memoryInitialize(); + + DEBUG_FUNCTION_LINE("Initialize video"); + video = new CVideo(GX2_TV_SCAN_MODE_720P, GX2_DRC_RENDER_MODE_SINGLE); + DEBUG_FUNCTION_LINE("Video size %i x %i", video->getTvWidth(), video->getTvHeight()); + + //! setup default Font + DEBUG_FUNCTION_LINE("Initialize main font system"); + auto *fontSystem = new FreeTypeGX(Resources::GetFile("font.ttf"), Resources::GetFileSize("font.ttf"), true); + GuiText::setPresetFont(fontSystem); + + if (mainWindow == nullptr) { + DEBUG_FUNCTION_LINE("Initialize main window"); + mainWindow = new MainWindow(video->getTvWidth(), video->getTvHeight()); + } + + } + executeProcess = true; + } + break; + } + case PROCUI_STATUS_IN_BACKGROUND: + default: + break; } return executeProcess; } -void Application::executeThread(void) { - DEBUG_FUNCTION_LINE("Entering main loop\n"); +void Application::executeThread() { + DEBUG_FUNCTION_LINE("Entering main loop"); //! main GX2 loop (60 Hz cycle with max priority on core 1) - while(!exitApplication) { - if(procUI() == false) { + while (!exitApplication) { + if (!procUI()) { continue; } @@ -235,20 +212,12 @@ void Application::executeThread(void) { mainWindow->process(); //! Read out inputs - for(int32_t i = 0; i < 5; i++) { - if(controller[i]->update(video->getTvWidth(), video->getTvHeight()) == false) + for (auto &i: controller) { + if (!i->update(video->getTvWidth(), video->getTvHeight())) continue; //! update controller states - mainWindow->update(controller[i]); - - if(controller[i]->data.buttons_d & VPAD_BUTTON_HOME) { - if (sFromHBL) { - fadeOut(); - SYSRelaunchTitle(0, NULL); - continue; - } - } + mainWindow->update(i); } //! start rendering DRC @@ -262,7 +231,7 @@ void Application::executeThread(void) { video->tvDrawDone(); //! enable screen after first frame render - if(video->getFrameCount() == 0) { + if (video->getFrameCount() == 0) { video->tvEnable(true); video->drcEnable(true); } @@ -274,33 +243,22 @@ void Application::executeThread(void) { video->waitForVSync(); } - if(bgMusic) { + if (bgMusic) { bgMusic->SetVolume(0); } - //! in case we exit to a homebrew let's smoothly fade out - if(video) { - uint64_t titleID = OSGetTitleID(); - if (titleID == HBL_TITLE_ID || - titleID == MII_MAKER_JPN_TITLE_ID || - titleID == MII_MAKER_USA_TITLE_ID || - titleID == MII_MAKER_EUR_TITLE_ID) { - fadeOut(); - } - } - - DEBUG_FUNCTION_LINE("delete mainWindow\n"); + DEBUG_FUNCTION_LINE("delete mainWindow"); delete mainWindow; - mainWindow = NULL; + mainWindow = nullptr; - DEBUG_FUNCTION_LINE("delete fontSystem\n"); + DEBUG_FUNCTION_LINE("delete fontSystem"); delete fontSystem; - fontSystem = NULL; + fontSystem = nullptr; - DEBUG_FUNCTION_LINE("delete video\n"); + DEBUG_FUNCTION_LINE("delete video"); delete video; - video = NULL; + video = nullptr; - DEBUG_FUNCTION_LINE("deinitialize memory\n"); + DEBUG_FUNCTION_LINE("deinitialize memory"); libgui_memoryRelease(); } diff --git a/src/Application.h b/src/Application.h index c1a5798..248e819 100644 --- a/src/Application.h +++ b/src/Application.h @@ -26,21 +26,23 @@ class FreeTypeGX; class Application : public CThread { public: - static Application * instance() { - if(!applicationInstance) + static Application *instance() { + if (!applicationInstance) applicationInstance = new Application(); return applicationInstance; } + static void destroyInstance() { - if(applicationInstance) { + if (applicationInstance) { delete applicationInstance; - applicationInstance = NULL; + applicationInstance = nullptr; } } CVideo *getVideo(void) const { return video; } + MainWindow *getMainWindow(void) const { return mainWindow; } @@ -50,12 +52,14 @@ public: } int exec(void); + void fadeOut(void); void quit(int code); private: Application(); + virtual ~Application(); bool procUI(void); @@ -70,9 +74,9 @@ private: CVideo *video; MainWindow *mainWindow; FreeTypeGX *fontSystem; - GuiController *controller[5]; + GuiController *controller[5]{}; int exitCode; - BOOL sFromHBL = FALSE; + BOOL sFromHBL = FALSE; }; diff --git a/src/common/common.h b/src/common/common.h index 3e36f03..727b29d 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -1,5 +1,5 @@ #ifndef COMMON_H -#define COMMON_H +#define COMMON_H #ifdef __cplusplus extern "C" { @@ -12,5 +12,5 @@ extern "C" { } #endif -#endif /* COMMON_H */ +#endif /* COMMON_H */ diff --git a/src/entry.cpp b/src/entry.cpp index 7e019c2..07d3650 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -1,20 +1,39 @@ -#include -#include -#include "utils/logger.h" #include "common/common.h" +#include +#include +#include +#include "utils/logger.h" #include "Application.h" int32_t main(int32_t argc, char **argv) { - socket_lib_init(); - log_init(); - DEBUG_FUNCTION_LINE("Starting launchiine " LAUNCHIINE_VERSION "\n"); + bool moduleInit; + bool cafeInit = false; + bool udpInit = false; - DEBUG_FUNCTION_LINE("Start main application\n"); + if (!(moduleInit = WHBLogModuleInit())) { + cafeInit = WHBLogCafeInit(); + udpInit = WHBLogUdpInit(); + } + DEBUG_FUNCTION_LINE("Starting launchiine " LAUNCHIINE_VERSION ""); + + DEBUG_FUNCTION_LINE("Start main application"); Application::instance()->exec(); - DEBUG_FUNCTION_LINE("Main application stopped\n"); + DEBUG_FUNCTION_LINE("Main application stopped"); Application::destroyInstance(); - DEBUG_FUNCTION_LINE("Peace out...\n"); + DEBUG_FUNCTION_LINE("Peace out..."); + + if (cafeInit) { + WHBLogCafeDeinit(); + } + + if (udpInit) { + WHBLogUdpDeinit(); + } + + if (moduleInit) { + WHBLogModuleDeinit(); + } return 0; } diff --git a/src/fs/CFile.cpp b/src/fs/CFile.cpp index c2a7ae6..fa84541 100644 --- a/src/fs/CFile.cpp +++ b/src/fs/CFile.cpp @@ -7,17 +7,17 @@ CFile::CFile() { iFd = -1; - mem_file = NULL; + mem_file = nullptr; filesize = 0; pos = 0; } -CFile::CFile(const std::string & filepath, eOpenTypes mode) { +CFile::CFile(const std::string &filepath, eOpenTypes mode) { iFd = -1; this->open(filepath, mode); } -CFile::CFile(const uint8_t * mem, int32_t size) { +CFile::CFile(const uint8_t *mem, int32_t size) { iFd = -1; this->open(mem, size); } @@ -26,27 +26,27 @@ CFile::~CFile() { this->close(); } -int32_t CFile::open(const std::string & filepath, eOpenTypes mode) { +int32_t CFile::open(const std::string &filepath, eOpenTypes mode) { this->close(); int32_t openMode = 0; // This depend on the devoptab implementation. // see https://github.com/devkitPro/wut/blob/master/libraries/wutdevoptab/devoptab_fs_open.c#L21 fpr reference - switch(mode) { - default: - case ReadOnly: // file must exist - openMode = O_RDONLY; - break; - case WriteOnly: // file will be created / zerod - openMode = O_TRUNC | O_CREAT | O_WRONLY; - break; - case ReadWrite: // file must exist - openMode = O_RDWR; - break; - case Append: // append to file, file will be created if missing. write only - openMode = O_CREAT | O_APPEND | O_WRONLY; - break; + switch (mode) { + default: + case ReadOnly: // file must exist + openMode = O_RDONLY; + break; + case WriteOnly: // file will be created / zerod + openMode = O_TRUNC | O_CREAT | O_WRONLY; + break; + case ReadWrite: // file must exist + openMode = O_RDWR; + break; + case Append: // append to file, file will be created if missing. write only + openMode = O_CREAT | O_APPEND | O_WRONLY; + break; } //! Using fopen works only on the first launch as expected @@ -54,7 +54,7 @@ int32_t CFile::open(const std::string & filepath, eOpenTypes mode) { //! the .data sections which is needed for a normal application to re-init //! this will be added with launching as RPX iFd = ::open(filepath.c_str(), openMode); - if(iFd < 0) + if (iFd < 0) return iFd; @@ -64,7 +64,7 @@ int32_t CFile::open(const std::string & filepath, eOpenTypes mode) { return 0; } -int32_t CFile::open(const uint8_t * mem, int32_t size) { +int32_t CFile::open(const uint8_t *mem, int32_t size) { this->close(); mem_file = mem; @@ -74,33 +74,33 @@ int32_t CFile::open(const uint8_t * mem, int32_t size) { } void CFile::close() { - if(iFd >= 0) + if (iFd >= 0) ::close(iFd); iFd = -1; - mem_file = NULL; + mem_file = nullptr; filesize = 0; pos = 0; } -int32_t CFile::read(uint8_t * ptr, size_t size) { - if(iFd >= 0) { - int32_t ret = ::read(iFd, ptr,size); - if(ret > 0) +int32_t CFile::read(uint8_t *ptr, size_t size) { + if (iFd >= 0) { + int32_t ret = ::read(iFd, ptr, size); + if (ret > 0) pos += ret; return ret; } int32_t readsize = size; - if(readsize > (int64_t) (filesize-pos)) - readsize = filesize-pos; + if (readsize > (int64_t) (filesize - pos)) + readsize = filesize - pos; - if(readsize <= 0) + if (readsize <= 0) return readsize; - if(mem_file != NULL) { - memcpy(ptr, mem_file+pos, readsize); + if (mem_file != nullptr) { + memcpy(ptr, mem_file + pos, readsize); pos += readsize; return readsize; } @@ -108,12 +108,12 @@ int32_t CFile::read(uint8_t * ptr, size_t size) { return -1; } -int32_t CFile::write(const uint8_t * ptr, size_t size) { - if(iFd >= 0) { +int32_t CFile::write(const uint8_t *ptr, size_t size) { + if (iFd >= 0) { size_t done = 0; - while(done < size) { + while (done < size) { int32_t ret = ::write(iFd, ptr, size - done); - if(ret <= 0) + if (ret <= 0) return ret; ptr += ret; @@ -130,25 +130,25 @@ int32_t CFile::seek(long int offset, int32_t origin) { int32_t ret = 0; int64_t newPos = pos; - if(origin == SEEK_SET) { + if (origin == SEEK_SET) { newPos = offset; - } else if(origin == SEEK_CUR) { + } else if (origin == SEEK_CUR) { newPos += offset; - } else if(origin == SEEK_END) { - newPos = filesize+offset; + } else if (origin == SEEK_END) { + newPos = filesize + offset; } - if(newPos < 0) { + if (newPos < 0) { pos = 0; } else { pos = newPos; } - if(iFd >= 0) + if (iFd >= 0) ret = ::lseek(iFd, pos, SEEK_SET); - if(mem_file != NULL) { - if(pos > filesize) { + if (mem_file != nullptr) { + if (pos > filesize) { pos = filesize; } } @@ -163,8 +163,8 @@ int32_t CFile::fwrite(const char *format, ...) { va_list va; va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { - result = this->write((uint8_t *)tmp, strlen(tmp)); + if ((vsprintf(tmp, format, va) >= 0)) { + result = this->write((uint8_t *) tmp, strlen(tmp)); } va_end(va); diff --git a/src/fs/CFile.hpp b/src/fs/CFile.hpp index 8816a49..6c0421b 100644 --- a/src/fs/CFile.hpp +++ b/src/fs/CFile.hpp @@ -18,18 +18,22 @@ public: }; CFile(); - CFile(const std::string & filepath, eOpenTypes mode); - CFile(const uint8_t * memory, int32_t memsize); + + CFile(const std::string &filepath, eOpenTypes mode); + + CFile(const uint8_t *memory, int32_t memsize); + virtual ~CFile(); - int32_t open(const std::string & filepath, eOpenTypes mode); - int32_t open(const uint8_t * memory, int32_t memsize); + int32_t open(const std::string &filepath, eOpenTypes mode); + + int32_t open(const uint8_t *memory, int32_t memsize); BOOL isOpen() const { - if(iFd >= 0) + if (iFd >= 0) return true; - if(mem_file) + if (mem_file) return true; return false; @@ -37,23 +41,29 @@ public: void close(); - int32_t read(uint8_t * ptr, size_t size); - int32_t write(const uint8_t * ptr, size_t size); + int32_t read(uint8_t *ptr, size_t size); + + int32_t write(const uint8_t *ptr, size_t size); + int32_t fwrite(const char *format, ...); + int32_t seek(long int offset, int32_t origin); + uint64_t tell() { return pos; }; + uint64_t size() { return filesize; }; + void rewind() { this->seek(0, SEEK_SET); }; protected: int32_t iFd; - const uint8_t * mem_file; + const uint8_t *mem_file; uint64_t filesize; uint64_t pos; }; diff --git a/src/fs/DirList.cpp b/src/fs/DirList.cpp index 450d4b6..d48ce2d 100644 --- a/src/fs/DirList.cpp +++ b/src/fs/DirList.cpp @@ -42,7 +42,7 @@ DirList::DirList() { Depth = 0; } -DirList::DirList(const std::string & path, const char *filter, uint32_t flags, uint32_t maxDepth) { +DirList::DirList(const std::string &path, const char *filter, uint32_t flags, uint32_t maxDepth) { this->LoadPath(path, filter, flags, maxDepth); this->SortList(); } @@ -51,8 +51,8 @@ DirList::~DirList() { ClearList(); } -BOOL DirList::LoadPath(const std::string & folder, const char *filter, uint32_t flags, uint32_t maxDepth) { - if(folder.empty()) +BOOL DirList::LoadPath(const std::string &folder, const char *filter, uint32_t flags, uint32_t maxDepth) { + if (folder.empty()) return false; Flags = flags; @@ -66,11 +66,11 @@ BOOL DirList::LoadPath(const std::string & folder, const char *filter, uint32_t StringTools::RemoveDoubleSlashs(folderpath); //! remove last slash if exists - if(length > 0 && folderpath[length-1] == '/') - folderpath.erase(length-1); + if (length > 0 && folderpath[length - 1] == '/') + folderpath.erase(length - 1); //! add root slash if missing - if(folderpath.find('/') == std::string::npos) { + if (folderpath.find('/') == std::string::npos) { folderpath += '/'; } @@ -78,27 +78,27 @@ BOOL DirList::LoadPath(const std::string & folder, const char *filter, uint32_t } BOOL DirList::InternalLoadPath(std::string &folderpath) { - if(folderpath.size() < 3) + if (folderpath.size() < 3) return false; - struct dirent *dirent = NULL; - DIR *dir = NULL; + struct dirent *dirent = nullptr; + DIR *dir = nullptr; dir = opendir(folderpath.c_str()); - if (dir == NULL) + if (dir == nullptr) return false; while ((dirent = readdir(dir)) != 0) { BOOL isDir = dirent->d_type & DT_DIR; const char *filename = dirent->d_name; - if(isDir) { - if(strcmp(filename,".") == 0 || strcmp(filename,"..") == 0) + if (isDir) { + if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0) continue; - if((Flags & CheckSubfolders) && (Depth > 0)) { + if ((Flags & CheckSubfolders) && (Depth > 0)) { int32_t length = folderpath.size(); - if(length > 2 && folderpath[length-1] != '/') { + if (length > 2 && folderpath[length - 1] != '/') { folderpath += '/'; } folderpath += filename; @@ -109,18 +109,18 @@ BOOL DirList::InternalLoadPath(std::string &folderpath) { Depth++; } - if(!(Flags & Dirs)) + if (!(Flags & Dirs)) continue; - } else if(!(Flags & Files)) { + } else if (!(Flags & Files)) { continue; } - if(Filter) { - char * fileext = strrchr(filename, '.'); - if(!fileext) + if (Filter) { + char *fileext = strrchr(filename, '.'); + if (!fileext) continue; - if(StringTools::strtokcmp(fileext, Filter, ",") == 0) + if (StringTools::strtokcmp(fileext, Filter, ",") == 0) AddEntrie(folderpath, filename, isDir); } else { AddEntrie(folderpath, filename, isDir); @@ -131,16 +131,16 @@ BOOL DirList::InternalLoadPath(std::string &folderpath) { return true; } -void DirList::AddEntrie(const std::string &filepath, const char * filename, BOOL isDir) { - if(!filename) +void DirList::AddEntrie(const std::string &filepath, const char *filename, BOOL isDir) { + if (!filename) return; int32_t pos = FileInfo.size(); - FileInfo.resize(pos+1); + FileInfo.resize(pos + 1); - FileInfo[pos].FilePath = (char *) malloc(filepath.size()+strlen(filename)+2); - if(!FileInfo[pos].FilePath) { + FileInfo[pos].FilePath = (char *) malloc(filepath.size() + strlen(filename) + 2); + if (!FileInfo[pos].FilePath) { FileInfo.resize(pos); return; } @@ -150,10 +150,10 @@ void DirList::AddEntrie(const std::string &filepath, const char * filename, BOOL } void DirList::ClearList() { - for(uint32_t i = 0; i < FileInfo.size(); ++i) { - if(FileInfo[i].FilePath) { + for (uint32_t i = 0; i < FileInfo.size(); ++i) { + if (FileInfo[i].FilePath) { free(FileInfo[i].FilePath); - FileInfo[i].FilePath = NULL; + FileInfo[i].FilePath = nullptr; } } @@ -161,37 +161,37 @@ void DirList::ClearList() { std::vector().swap(FileInfo); } -const char * DirList::GetFilename(int32_t ind) const { +const char *DirList::GetFilename(int32_t ind) const { if (!valid(ind)) return ""; return StringTools::FullpathToFilename(FileInfo[ind].FilePath); } -static BOOL SortCallback(const DirEntry & f1, const DirEntry & f2) { - if(f1.isDir && !(f2.isDir)) +static BOOL SortCallback(const DirEntry &f1, const DirEntry &f2) { + if (f1.isDir && !(f2.isDir)) return true; - if(!(f1.isDir) && f2.isDir) + if (!(f1.isDir) && f2.isDir) return false; - if(f1.FilePath && !f2.FilePath) + if (f1.FilePath && !f2.FilePath) return true; - if(!f1.FilePath) + if (!f1.FilePath) return false; - if(strcasecmp(f1.FilePath, f2.FilePath) > 0) + if (strcasecmp(f1.FilePath, f2.FilePath) > 0) return false; return true; } void DirList::SortList() { - if(FileInfo.size() > 1) + if (FileInfo.size() > 1) std::sort(FileInfo.begin(), FileInfo.end(), SortCallback); } void DirList::SortList(BOOL (*SortFunc)(const DirEntry &a, const DirEntry &b)) { - if(FileInfo.size() > 1) + if (FileInfo.size() > 1) std::sort(FileInfo.begin(), FileInfo.end(), SortFunc); } @@ -199,14 +199,14 @@ uint64_t DirList::GetFilesize(int32_t index) const { struct stat st; const char *path = GetFilepath(index); - if(!path || stat(path, &st) != 0) + if (!path || stat(path, &st) != 0) return 0; return st.st_size; } int32_t DirList::GetFileIndex(const char *filename) const { - if(!filename) + if (!filename) return -1; for (uint32_t i = 0; i < FileInfo.size(); ++i) { diff --git a/src/fs/DirList.h b/src/fs/DirList.h index b9559aa..8c3eba6 100644 --- a/src/fs/DirList.h +++ b/src/fs/DirList.h @@ -32,7 +32,7 @@ #include typedef struct { - char * FilePath; + char *FilePath; BOOL isDir; } DirEntry; @@ -40,17 +40,22 @@ class DirList { public: //!Constructor DirList(void); + //!\param path Path from where to load the filelist of all files //!\param filter A fileext that needs to be filtered //!\param flags search/filter flags from the enum - DirList(const std::string & path, const char *filter = NULL, uint32_t flags = Files | Dirs, uint32_t maxDepth = 0xffffffff); + DirList(const std::string &path, const char *filter = nullptr, uint32_t flags = Files | Dirs, uint32_t maxDepth = 0xffffffff); + //!Destructor virtual ~DirList(); + //! Load all the files from a directory - BOOL LoadPath(const std::string & path, const char *filter = NULL, uint32_t flags = Files | Dirs, uint32_t maxDepth = 0xffffffff); + BOOL LoadPath(const std::string &path, const char *filter = nullptr, uint32_t flags = Files | Dirs, uint32_t maxDepth = 0xffffffff); + //! Get a filename of the list //!\param list index - const char * GetFilename(int32_t index) const; + const char *GetFilename(int32_t index) const; + //! Get the a filepath of the list //!\param list index const char *GetFilepath(int32_t index) const { @@ -59,26 +64,33 @@ public: else return FileInfo[index].FilePath; } + //! Get the a filesize of the list //!\param list index uint64_t GetFilesize(int32_t index) const; + //! Is index a dir or a file //!\param list index BOOL IsDir(int32_t index) const { - if(!valid(index)) + if (!valid(index)) return false; return FileInfo[index].isDir; }; + //! Get the filecount of the whole list int32_t GetFilecount() const { return FileInfo.size(); }; + //! Sort list by filepath void SortList(); + //! Custom sort command for custom sort functions definitions void SortList(BOOL (*SortFunc)(const DirEntry &a, const DirEntry &b)); + //! Get the index of the specified filename int32_t GetFileIndex(const char *filename) const; + //! Enum for search/filter flags enum { Files = 0x01, @@ -88,10 +100,13 @@ public: protected: // Internal parser BOOL InternalLoadPath(std::string &path); + //!Add a list entrie - void AddEntrie(const std::string &filepath, const char * filename, BOOL isDir); + void AddEntrie(const std::string &filepath, const char *filename, BOOL isDir); + //! Clear the list void ClearList(); + //! Check if valid pos is requested inline BOOL valid(uint32_t pos) const { return (pos < FileInfo.size()); diff --git a/src/fs/FSUtils.cpp b/src/fs/FSUtils.cpp index 5a0579f..e3ddc44 100644 --- a/src/fs/FSUtils.cpp +++ b/src/fs/FSUtils.cpp @@ -9,8 +9,8 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_t *size) { //! always initialze input - *inbuffer = NULL; - if(size) + *inbuffer = nullptr; + if (size) *size = 0; int32_t iFd = open(filepath, O_RDONLY); @@ -21,7 +21,7 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_ lseek(iFd, 0, SEEK_SET); uint8_t *buffer = (uint8_t *) malloc(filesize); - if (buffer == NULL) { + if (buffer == nullptr) { close(iFd); return -2; } @@ -30,12 +30,12 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_ uint32_t done = 0; int32_t readBytes = 0; - while(done < filesize) { - if(done + blocksize > filesize) { + while (done < filesize) { + if (done + blocksize > filesize) { blocksize = filesize - done; } readBytes = read(iFd, buffer + done, blocksize); - if(readBytes <= 0) + if (readBytes <= 0) break; done += readBytes; } @@ -44,34 +44,34 @@ int32_t FSUtils::LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_ if (done != filesize) { free(buffer); - buffer = NULL; + buffer = nullptr; return -3; } *inbuffer = buffer; //! sign is optional input - if(size) { + if (size) { *size = filesize; } return filesize; } -int32_t FSUtils::CheckFile(const char * filepath) { - if(!filepath) +int32_t FSUtils::CheckFile(const char *filepath) { + if (!filepath) return 0; struct stat filestat; - char dirnoslash[strlen(filepath)+2]; + char dirnoslash[strlen(filepath) + 2]; snprintf(dirnoslash, sizeof(dirnoslash), "%s", filepath); - while(dirnoslash[strlen(dirnoslash)-1] == '/') - dirnoslash[strlen(dirnoslash)-1] = '\0'; + while (dirnoslash[strlen(dirnoslash) - 1] == '/') + dirnoslash[strlen(dirnoslash) - 1] = '\0'; - char * notRoot = strrchr(dirnoslash, '/'); - if(!notRoot) { + char *notRoot = strrchr(dirnoslash, '/'); + if (!notRoot) { strcat(dirnoslash, "/"); } @@ -81,29 +81,29 @@ int32_t FSUtils::CheckFile(const char * filepath) { return 0; } -int32_t FSUtils::CreateSubfolder(const char * fullpath) { - if(!fullpath) +int32_t FSUtils::CreateSubfolder(const char *fullpath) { + if (!fullpath) return 0; int32_t result = 0; - char dirnoslash[strlen(fullpath)+1]; + char dirnoslash[strlen(fullpath) + 1]; strcpy(dirnoslash, fullpath); - int32_t pos = strlen(dirnoslash)-1; - while(dirnoslash[pos] == '/') { + int32_t pos = strlen(dirnoslash) - 1; + while (dirnoslash[pos] == '/') { dirnoslash[pos] = '\0'; pos--; } - if(CheckFile(dirnoslash)) { + if (CheckFile(dirnoslash)) { return 1; } else { - char parentpath[strlen(dirnoslash)+2]; + char parentpath[strlen(dirnoslash) + 2]; strcpy(parentpath, dirnoslash); - char * ptr = strrchr(parentpath, '/'); + char *ptr = strrchr(parentpath, '/'); - if(!ptr) { + if (!ptr) { //!Device root directory (must be with '/') strcat(parentpath, "/"); struct stat filestat; @@ -119,7 +119,7 @@ int32_t FSUtils::CreateSubfolder(const char * fullpath) { result = CreateSubfolder(parentpath); } - if(!result) + if (!result) return 0; if (mkdir(dirnoslash, 0777) == -1) { @@ -129,13 +129,13 @@ int32_t FSUtils::CreateSubfolder(const char * fullpath) { return 1; } -int32_t FSUtils::saveBufferToFile(const char * path, void * buffer, uint32_t size) { +int32_t FSUtils::saveBufferToFile(const char *path, void *buffer, uint32_t size) { CFile file(path, CFile::WriteOnly); if (!file.isOpen()) { - DEBUG_FUNCTION_LINE("Failed to open %s\n",path); + DEBUG_FUNCTION_LINE("Failed to open %s", path); return 0; } - int32_t written = file.write((const uint8_t*) buffer, size); + int32_t written = file.write((const uint8_t *) buffer, size); file.close(); return written; } diff --git a/src/fs/FSUtils.h b/src/fs/FSUtils.h index 9ee748a..7899406 100644 --- a/src/fs/FSUtils.h +++ b/src/fs/FSUtils.h @@ -8,9 +8,11 @@ public: static int32_t LoadFileToMem(const char *filepath, uint8_t **inbuffer, uint32_t *size); //! todo: C++ class - static int32_t CreateSubfolder(const char * fullpath); - static int32_t CheckFile(const char * filepath); - static int32_t saveBufferToFile(const char * path, void * buffer, uint32_t size); + static int32_t CreateSubfolder(const char *fullpath); + + static int32_t CheckFile(const char *filepath); + + static int32_t saveBufferToFile(const char *path, void *buffer, uint32_t size); }; #endif // __FS_UTILS_H_ diff --git a/src/game/GameList.cpp b/src/game/GameList.cpp index 7a53943..48ac91d 100644 --- a/src/game/GameList.cpp +++ b/src/game/GameList.cpp @@ -24,27 +24,27 @@ GameList::~GameList() { void GameList::clear() { lock(); - for (auto const& x : fullGameList) { - if(x != NULL) { - if(x->imageData != NULL) { + for (auto const &x: fullGameList) { + if (x != nullptr) { + if (x->imageData != nullptr) { AsyncExecutor::pushForDelete(x->imageData); - x->imageData = NULL; + x->imageData = nullptr; } delete x; } } fullGameList.clear(); //! Clear memory of the vector completely - std::vector().swap(fullGameList); + std::vector().swap(fullGameList); unlock(); titleListChanged(this); } -gameInfo * GameList::getGameInfo(uint64_t titleId){ - gameInfo * result = NULL; +gameInfo *GameList::getGameInfo(uint64_t titleId) { + gameInfo *result = nullptr; lock(); for (uint32_t i = 0; i < fullGameList.size(); ++i) { - if(titleId == fullGameList[i]->titleId){ + if (titleId == fullGameList[i]->titleId) { result = fullGameList[i]; break; } @@ -55,13 +55,13 @@ gameInfo * GameList::getGameInfo(uint64_t titleId){ int32_t GameList::readGameList() { // Clear list - for (auto const& x : fullGameList) { + for (auto const &x: fullGameList) { delete x; } fullGameList.clear(); //! Clear memory of the vector completely - std::vector().swap(fullGameList); + std::vector().swap(fullGameList); int32_t cnt = 0; @@ -79,23 +79,23 @@ int32_t GameList::readGameList() { std::vector titles(titleCount); uint32_t realTitleCount = 0; - static const std::vector menuAppTypes { - MCP_APP_TYPE_GAME, - MCP_APP_TYPE_GAME_WII, - MCP_APP_TYPE_SYSTEM_APPS, - MCP_APP_TYPE_SYSTEM_SETTINGS, - MCP_APP_TYPE_FRIEND_LIST, - MCP_APP_TYPE_MIIVERSE, - MCP_APP_TYPE_ESHOP, - MCP_APP_TYPE_BROWSER, - MCP_APP_TYPE_DOWNLOAD_MANAGEMENT, - MCP_APP_TYPE_ACCOUNT_APPS, + static const std::vector menuAppTypes{ + MCP_APP_TYPE_GAME, + MCP_APP_TYPE_GAME_WII, + MCP_APP_TYPE_SYSTEM_APPS, + MCP_APP_TYPE_SYSTEM_SETTINGS, + MCP_APP_TYPE_FRIEND_LIST, + MCP_APP_TYPE_MIIVERSE, + MCP_APP_TYPE_ESHOP, + MCP_APP_TYPE_BROWSER, + MCP_APP_TYPE_DOWNLOAD_MANAGEMENT, + MCP_APP_TYPE_ACCOUNT_APPS, }; - for (auto appType : menuAppTypes) { + for (auto appType: menuAppTypes) { uint32_t titleCountByType = 0; MCPError err = MCP_TitleListByAppType(mcp, appType, &titleCountByType, titles.data() + realTitleCount, - (titles.size() - realTitleCount) * sizeof(decltype(titles)::value_type)); + (titles.size() - realTitleCount) * sizeof(decltype(titles)::value_type)); if (err < 0) { MCP_Close(mcp); return 0; @@ -106,13 +106,13 @@ int32_t GameList::readGameList() { titles.resize(realTitleCount); } - for (auto title_candidate : titles) { - gameInfo* newGameInfo = new gameInfo; + for (auto title_candidate: titles) { + auto *newGameInfo = new gameInfo; newGameInfo->titleId = title_candidate.titleId; newGameInfo->appType = title_candidate.appType; newGameInfo->gamePath = title_candidate.path; newGameInfo->name = ""; - newGameInfo->imageData = NULL; + newGameInfo->imageData = nullptr; DCFlushRange(newGameInfo, sizeof(gameInfo)); fullGameList.push_back(newGameInfo); @@ -122,35 +122,31 @@ int32_t GameList::readGameList() { AsyncExecutor::execute([this] { lock(); - for (uint32_t i = 0; i < fullGameList.size(); ++i) { - gameInfo *header = fullGameList[i]; - + for (auto header : fullGameList) { DCFlushRange(&stopAsyncLoading, sizeof(stopAsyncLoading)); - if(stopAsyncLoading) { - DEBUG_FUNCTION_LINE("Stop async title loading\n"); + if (stopAsyncLoading) { + DEBUG_FUNCTION_LINE("Stop async title loading"); break; } - DEBUG_FUNCTION_LINE("Load extra infos of %016llX\n",header->titleId); - ACPMetaXml* meta = (ACPMetaXml*)calloc(1, 0x4000); //TODO fix wut - if(meta) { + DEBUG_FUNCTION_LINE("Load extra infos of %016llX", header->titleId); + auto *meta = (ACPMetaXml *) calloc(1, 0x4000); //TODO fix wut + if (meta) { auto acp = ACPGetTitleMetaXml(header->titleId, meta); - if(acp >= 0) { + if (acp >= 0) { header->name = meta->shortname_en; } free(meta); } - if(header->imageData == NULL) { + if (header->imageData == nullptr) { std::string filepath = "fs:" + header->gamePath + META_PATH + "/iconTex.tga"; - uint8_t *buffer = NULL; + uint8_t *buffer = nullptr; uint32_t bufferSize = 0; int iResult = FSUtils::LoadFileToMem(filepath.c_str(), &buffer, &bufferSize); - if(iResult > 0) { - GuiImageData * imageData = new GuiImageData(buffer, bufferSize, GX2_TEX_CLAMP_MODE_MIRROR); - if(imageData) { - header->imageData = imageData; - } + if (iResult > 0) { + auto *imageData = new GuiImageData(buffer, bufferSize, GX2_TEX_CLAMP_MODE_MIRROR); + header->imageData = imageData; //! free original image buffer which is converted to texture now and not needed anymore free(buffer); @@ -167,15 +163,15 @@ int32_t GameList::readGameList() { void GameList::updateTitleInfo() { for (int i = 0; i < this->size(); i++) { - gameInfo * newHeader = this->at(i); + gameInfo *newHeader = this->at(i); bool hasChanged = false; - if(newHeader->name.empty()) { - ACPMetaXml* meta = (ACPMetaXml*)calloc(1, 0x4000); //TODO fix wut - if(meta) { + if (newHeader->name.empty()) { + auto *meta = (ACPMetaXml *) calloc(1, 0x4000); //TODO fix wut + if (meta) { auto acp = ACPGetTitleMetaXml(newHeader->titleId, meta); - if(acp >= 0) { + if (acp >= 0) { newHeader->name = meta->shortname_en; hasChanged = true; } @@ -183,24 +179,22 @@ void GameList::updateTitleInfo() { } } - if(newHeader->imageData == NULL) { + if (newHeader->imageData == nullptr) { std::string filepath = "fs:" + newHeader->gamePath + META_PATH + "/iconTex.tga"; - uint8_t *buffer = NULL; + uint8_t *buffer = nullptr; uint32_t bufferSize = 0; int iResult = FSUtils::LoadFileToMem(filepath.c_str(), &buffer, &bufferSize); - if(iResult > 0) { - GuiImageData * imageData = new GuiImageData(buffer, bufferSize, GX2_TEX_CLAMP_MODE_MIRROR); - if(imageData) { - newHeader->imageData = imageData; - hasChanged = true; - } + if (iResult > 0) { + auto *imageData = new GuiImageData(buffer, bufferSize, GX2_TEX_CLAMP_MODE_MIRROR); + newHeader->imageData = imageData; + hasChanged = true; //! free original image buffer which is converted to texture now and not needed anymore free(buffer); } } - if(hasChanged) { + if (hasChanged) { DCFlushRange(newHeader, sizeof(gameInfo)); titleUpdated(newHeader); } @@ -209,11 +203,11 @@ void GameList::updateTitleInfo() { int32_t GameList::load() { lock(); - if(fullGameList.size() == 0) { + if (fullGameList.empty()) { readGameList(); } - AsyncExecutor::execute([&] { updateTitleInfo();}); + AsyncExecutor::execute([&] { updateTitleInfo(); }); titleListChanged(this); diff --git a/src/game/GameList.h b/src/game/GameList.h index 3a010ef..96921ae 100644 --- a/src/game/GameList.h +++ b/src/game/GameList.h @@ -14,12 +14,13 @@ typedef struct _gameInfo { MCPAppType appType; std::string name; std::string gamePath; - GuiImageData * imageData; + GuiImageData *imageData; } gameInfo; class GameList { public: GameList(); + ~GameList(); int32_t size() { @@ -28,6 +29,7 @@ public: unlock(); return res; } + int32_t gameCount() { lock(); int32_t res = fullGameList.size(); @@ -35,25 +37,27 @@ public: return res; } - gameInfo * at(int32_t i) { + gameInfo *at(int32_t i) { return operator[](i); } - gameInfo * operator[](int32_t i) { + + gameInfo *operator[](int32_t i) { lock(); - gameInfo * res = NULL; + gameInfo *res = nullptr; if (i < 0 || i >= (int32_t) fullGameList.size()) { - res = NULL; + res = nullptr; } else { res = fullGameList[i]; } unlock(); return res; } - gameInfo * getGameInfo(uint64_t titleId); + + gameInfo *getGameInfo(uint64_t titleId); void clear(); - std::vector & getFullGameList(void) { + std::vector &getFullGameList(void) { return fullGameList; } @@ -66,11 +70,14 @@ public: void lock() { _lock.lock(); } + void unlock() { _lock.unlock(); } + protected: int32_t readGameList(); + void updateTitleInfo(); std::vector fullGameList; diff --git a/src/gui/GameIcon.cpp b/src/gui/GameIcon.cpp index 239f423..7d558c4 100644 --- a/src/gui/GameIcon.cpp +++ b/src/gui/GameIcon.cpp @@ -11,7 +11,7 @@ static const float cfIconMirrorScale = 1.15f; static const float cfIconMirrorAlpha = 0.45f; GameIcon::GameIcon(GuiImageData *preloadImage) - : GuiImage(preloadImage) { + : GuiImage(preloadImage) { bSelected = false; bRenderStroke = true; bRenderReflection = false; @@ -36,46 +36,46 @@ GameIcon::GameIcon(GuiImageData *preloadImage) vtxCount = sizeof(cfGameIconPosVtxs) / (Shader3D::cuVertexAttrSize); //! texture and vertex coordinates - posVtxs = (float*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconPosVtxs)); - texCoords = (float*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconTexCoords)); + posVtxs = (float *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconPosVtxs)); + texCoords = (float *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconTexCoords)); - if(posVtxs) { - memcpy((float*)posVtxs, cfGameIconPosVtxs, sizeof(cfGameIconPosVtxs)); - GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, (float*)posVtxs, sizeof(cfGameIconPosVtxs)); + if (posVtxs) { + memcpy((float *) posVtxs, cfGameIconPosVtxs, sizeof(cfGameIconPosVtxs)); + GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, (float *) posVtxs, sizeof(cfGameIconPosVtxs)); } - if(texCoords) { - memcpy((float*)texCoords, cfGameIconTexCoords, sizeof(cfGameIconTexCoords)); - GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, (float*)texCoords, sizeof(cfGameIconTexCoords)); + if (texCoords) { + memcpy((float *) texCoords, cfGameIconTexCoords, sizeof(cfGameIconTexCoords)); + GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, (float *) texCoords, sizeof(cfGameIconTexCoords)); } //! create vertexes for the mirror frame - texCoordsMirror = (float*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconTexCoords)); + texCoordsMirror = (float *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconTexCoords)); - if(texCoordsMirror) { - for(uint32_t i = 0; i < vtxCount; i++) { - texCoordsMirror[i*2 + 0] = texCoords[i*2 + 0] * cfIconMirrorScale - ((cfIconMirrorScale - 1.0f) - (cfIconMirrorScale - 1.0f) * 0.5f); - texCoordsMirror[i*2 + 1] = texCoords[i*2 + 1] * cfIconMirrorScale - ((cfIconMirrorScale - 1.0f) - (cfIconMirrorScale - 1.0f) * 0.5f); + if (texCoordsMirror) { + for (uint32_t i = 0; i < vtxCount; i++) { + texCoordsMirror[i * 2 + 0] = texCoords[i * 2 + 0] * cfIconMirrorScale - ((cfIconMirrorScale - 1.0f) - (cfIconMirrorScale - 1.0f) * 0.5f); + texCoordsMirror[i * 2 + 1] = texCoords[i * 2 + 1] * cfIconMirrorScale - ((cfIconMirrorScale - 1.0f) - (cfIconMirrorScale - 1.0f) * 0.5f); } GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, texCoordsMirror, sizeof(cfGameIconTexCoords)); } //! setup stroke of the icon - strokePosVtxs = (float*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconStrokeVtxs)); - if(strokePosVtxs) { + strokePosVtxs = (float *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, sizeof(cfGameIconStrokeVtxs)); + if (strokePosVtxs) { memcpy(strokePosVtxs, cfGameIconStrokeVtxs, sizeof(cfGameIconStrokeVtxs)); GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, strokePosVtxs, sizeof(cfGameIconStrokeVtxs)); } - strokeTexCoords = (float*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, cuGameIconStrokeVtxCount * Shader::cuTexCoordAttrSize); - if(strokeTexCoords) { - for(size_t i = 0, n = 0; i < cuGameIconStrokeVtxCount; n += 2, i += 3) { + strokeTexCoords = (float *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, cuGameIconStrokeVtxCount * Shader::cuTexCoordAttrSize); + if (strokeTexCoords) { + for (size_t i = 0, n = 0; i < cuGameIconStrokeVtxCount; n += 2, i += 3) { strokeTexCoords[n] = (1.0f + strokePosVtxs[i]) * 0.5f; - strokeTexCoords[n+1] = 1.0f - (1.0f + strokePosVtxs[i+1]) * 0.5f; + strokeTexCoords[n + 1] = 1.0f - (1.0f + strokePosVtxs[i + 1]) * 0.5f; } GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, strokeTexCoords, cuGameIconStrokeVtxCount * Shader::cuTexCoordAttrSize); } - strokeColorVtxs = (uint8_t*)memalign(GX2_VERTEX_BUFFER_ALIGNMENT, cuGameIconStrokeVtxCount * Shader::cuColorAttrSize); - if(strokeColorVtxs) { - for(size_t i = 0; i < (cuGameIconStrokeVtxCount * Shader::cuColorAttrSize); i++) + strokeColorVtxs = (uint8_t *) memalign(GX2_VERTEX_BUFFER_ALIGNMENT, cuGameIconStrokeVtxCount * Shader::cuColorAttrSize); + if (strokeColorVtxs) { + for (size_t i = 0; i < (cuGameIconStrokeVtxCount * Shader::cuColorAttrSize); i++) strokeColorVtxs[i] = 0xff; GX2Invalidate(GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER, strokeColorVtxs, cuGameIconStrokeVtxCount * Shader::cuColorAttrSize); } @@ -83,47 +83,47 @@ GameIcon::GameIcon(GuiImageData *preloadImage) GameIcon::~GameIcon() { //! remove image so it can not be drawn anymore from this point on - imageData = NULL; + imageData = nullptr; //! main image vertexes - if(posVtxs) { - free((void*)posVtxs); - posVtxs = NULL; + if (posVtxs) { + free((void *) posVtxs); + posVtxs = nullptr; } - if(texCoords) { - free((void*)texCoords); - texCoords = NULL; + if (texCoords) { + free((void *) texCoords); + texCoords = nullptr; } //! mirror image vertexes - if(texCoordsMirror) { + if (texCoordsMirror) { free(texCoordsMirror); - texCoordsMirror = NULL; + texCoordsMirror = nullptr; } //! stroke image vertexes - if(strokePosVtxs) { + if (strokePosVtxs) { free(strokePosVtxs); - strokePosVtxs = NULL; + strokePosVtxs = nullptr; } - if(strokeTexCoords) { + if (strokeTexCoords) { free(strokeTexCoords); - strokeTexCoords = NULL; + strokeTexCoords = nullptr; } - if(strokeColorVtxs) { + if (strokeColorVtxs) { free(strokeColorVtxs); - strokeColorVtxs = NULL; + strokeColorVtxs = nullptr; } } -bool GameIcon::checkRayIntersection(const glm::vec3 & rayOrigin, const glm::vec3 & rayDirFrac) { +bool GameIcon::checkRayIntersection(const glm::vec3 &rayOrigin, const glm::vec3 &rayDirFrac) { //! since we always face the camera we can just check the AABB intersection //! otherwise an OOB intersection would be required float currPosX = getCenterX() * Application::instance()->getVideo()->getWidthScaleFactor() * 2.0f; float currPosY = getCenterY() * Application::instance()->getVideo()->getHeightScaleFactor() * 2.0f; float currPosZ = getDepth() * Application::instance()->getVideo()->getDepthScaleFactor() * 2.0f; - float currScaleX = getScaleX() * (float)getWidth() * Application::instance()->getVideo()->getWidthScaleFactor(); - float currScaleY = getScaleY() * (float)getHeight() * Application::instance()->getVideo()->getHeightScaleFactor(); - float currScaleZ = getScaleZ() * (float)getWidth() * Application::instance()->getVideo()->getDepthScaleFactor(); + float currScaleX = getScaleX() * (float) getWidth() * Application::instance()->getVideo()->getWidthScaleFactor(); + float currScaleY = getScaleY() * (float) getHeight() * Application::instance()->getVideo()->getHeightScaleFactor(); + float currScaleZ = getScaleZ() * (float) getWidth() * Application::instance()->getVideo()->getDepthScaleFactor(); //! lb is the corner of AABB with minimal coordinates - left bottom, rt is maximal corner glm::vec3 lb(currPosX - currScaleX, currPosY - currScaleY, currPosZ - currScaleZ); glm::vec3 rt(currPosX + currScaleX, currPosY + currScaleY, currPosZ + currScaleZ); @@ -154,29 +154,29 @@ bool GameIcon::checkRayIntersection(const glm::vec3 & rayOrigin, const glm::vec3 return true; } -void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm::mat4 & viewMtx, const glm::mat4 & modelView) { - if(imageData == NULL){ +void GameIcon::draw(CVideo *pVideo, const glm::mat4 &projectionMtx, const glm::mat4 &viewMtx, const glm::mat4 &modelView) { + if (imageData == nullptr) { return; } //! first setup 2D GUI positions float currPosX = getCenterX() * pVideo->getWidthScaleFactor() * 2.0f; float currPosY = getCenterY() * pVideo->getHeightScaleFactor() * 2.0f; float currPosZ = getDepth() * pVideo->getDepthScaleFactor() * 2.0f; - float currScaleX = getScaleX() * (float)getWidth() * pVideo->getWidthScaleFactor(); - float currScaleY = getScaleY() * (float)getHeight() * pVideo->getHeightScaleFactor(); - float currScaleZ = getScaleZ() * (float)getWidth() * pVideo->getDepthScaleFactor(); + float currScaleX = getScaleX() * (float) getWidth() * pVideo->getWidthScaleFactor(); + float currScaleY = getScaleY() * (float) getHeight() * pVideo->getHeightScaleFactor(); + float currScaleZ = getScaleZ() * (float) getWidth() * pVideo->getDepthScaleFactor(); float strokeScaleX = pVideo->getWidthScaleFactor() * strokeWidth * 0.25f + cfIconMirrorScale; float strokeScaleY = pVideo->getHeightScaleFactor() * strokeWidth * 0.25f + cfIconMirrorScale; - for(int32_t iDraw = 0; iDraw < 2; iDraw++) { - glm::vec4 * alphaFadeOut; + for (int32_t iDraw = 0; iDraw < 2; iDraw++) { + glm::vec4 *alphaFadeOut; glm::mat4 m_iconView; glm::mat4 m_mirrorView; glm::mat4 m_strokeView; - if(iDraw == RENDER_REFLECTION) { + if (iDraw == RENDER_REFLECTION) { //! Reflection render - if(!bRenderReflection) + if (!bRenderReflection) continue; m_iconView = glm::translate(modelView, glm::vec3(currPosX, -currScaleY * 2.0f - currPosY, currPosZ + cosf(DegToRad(rotationX)) * currScaleZ * 2.0f)); m_iconView = glm::rotate(m_iconView, DegToRad(rotationX), glm::vec3(1.0f, 0.0f, 0.0f)); @@ -190,7 +190,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: GX2SetCullOnlyControl(GX2_FRONT_FACE_CCW, GX2_ENABLE, GX2_DISABLE); } else { //! Normal render - m_iconView = glm::translate(modelView, glm::vec3(currPosX,currPosY, currPosZ)); + m_iconView = glm::translate(modelView, glm::vec3(currPosX, currPosY, currPosZ)); m_iconView = glm::rotate(m_iconView, DegToRad(rotationX), glm::vec3(1.0f, 0.0f, 0.0f)); m_iconView = glm::scale(m_iconView, glm::vec3(currScaleX, currScaleY, currScaleZ)); @@ -204,7 +204,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: colorIntensityMirror[3] = cfIconMirrorAlpha * colorIntensity[3]; - if(!bIconLast) { + if (!bIconLast) { Shader3D::instance()->setShaders(); Shader3D::instance()->setProjectionMtx(projectionMtx); Shader3D::instance()->setViewMtx(viewMtx); @@ -220,7 +220,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: } - if(bSelected) { + if (bSelected) { strokeFractalEnable = 0; GX2SetDepthOnlyControl(GX2_ENABLE, GX2_DISABLE, GX2_COMPARE_FUNC_LEQUAL); @@ -243,7 +243,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: GX2SetDepthOnlyControl(GX2_ENABLE, GX2_ENABLE, GX2_COMPARE_FUNC_LEQUAL); } - if(iDraw == RENDER_NORMAL && bRenderStroke) { + if (iDraw == RENDER_NORMAL && bRenderStroke) { strokeFractalEnable = 1; //! now render the icon stroke //! make the stroke a little bigger than the mirror, just by the line width on each side @@ -274,7 +274,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: Shader3D::instance()->setAttributeBuffer(vtxCount, posVtxs, texCoordsMirror); Shader3D::instance()->draw(GX2_PRIMITIVE_MODE_QUADS, vtxCount); - if(bIconLast) { + if (bIconLast) { Shader3D::instance()->setShaders(); Shader3D::instance()->setProjectionMtx(projectionMtx); Shader3D::instance()->setViewMtx(viewMtx); @@ -290,7 +290,7 @@ void GameIcon::draw(CVideo *pVideo, const glm::mat4 & projectionMtx, const glm:: } //! return back normal culling - if(iDraw == RENDER_REFLECTION) { + if (iDraw == RENDER_REFLECTION) { GX2SetCullOnlyControl(GX2_FRONT_FACE_CCW, GX2_DISABLE, GX2_ENABLE); } } diff --git a/src/gui/GameIcon.h b/src/gui/GameIcon.h index 65fef5f..02ba2af 100644 --- a/src/gui/GameIcon.h +++ b/src/gui/GameIcon.h @@ -4,52 +4,62 @@ #include #include -class GameIcon : public GuiImage -{ +class GameIcon : public GuiImage { public: GameIcon(GuiImageData *preloadImage); + virtual ~GameIcon(); void setRotationX(float r) { rotationX = r; } - void setColorIntensity(const glm::vec4 & color) { + + void setColorIntensity(const glm::vec4 &color) { colorIntensity = color; colorIntensityMirror = colorIntensity; selectionBlurOuterColorIntensity = color * glm::vec4(0.09411764f * 1.15f, 0.56862745f * 1.15f, 0.96862745098f * 1.15f, 1.0f); selectionBlurInnerColorIntensity = color * glm::vec4(0.46666667f, 0.90588235f, 1.0f, 1.0f); } - const glm::vec4 & getColorIntensity() const { + + const glm::vec4 &getColorIntensity() const { return colorIntensity; } - void setAlphaFadeOutNorm(const glm::vec4 & a) { + + void setAlphaFadeOutNorm(const glm::vec4 &a) { alphaFadeOutNorm = a; } - void setAlphaFadeOutRefl(const glm::vec4 & a) { + + void setAlphaFadeOutRefl(const glm::vec4 &a) { alphaFadeOutRefl = a; } + void setRenderReflection(bool enable) { bRenderReflection = enable; } + void setSelected(bool enable) { bSelected = enable; } + void setStrokeRender(bool enable) { bRenderStroke = enable; } + void setRenderIconLast(bool enable) { bIconLast = enable; } + void draw(CVideo *pVideo) { static const glm::mat4 identity(1.0f); draw(pVideo, identity, identity, identity); } - void draw(CVideo *pVideo, const glm::mat4 & projection, const glm::mat4 & view, const glm::mat4 & modelView); - bool checkRayIntersection(const glm::vec3 & rayOrigin, const glm::vec3 & rayDirFrac); + void draw(CVideo *pVideo, const glm::mat4 &projection, const glm::mat4 &view, const glm::mat4 &modelView); + + bool checkRayIntersection(const glm::vec3 &rayOrigin, const glm::vec3 &rayDirFrac); + private: - enum eRenderState - { + enum eRenderState { RENDER_REFLECTION, RENDER_NORMAL }; diff --git a/src/gui/GameIconModel.h b/src/gui/GameIconModel.h index f8c87b1..f408409 100644 --- a/src/gui/GameIconModel.h +++ b/src/gui/GameIconModel.h @@ -2,758 +2,758 @@ #define ICON_MODEL_H_ static const float cfGameIconPosVtxs[] = { --0.844501f,-0.861263f,0.050154f,-0.802664f,-0.8797f,0.054004f,-0.809968f,-0.828995f,0.061777f,-0.864233f,-0.822169f,0.054004f, --0.802664f,-0.8797f,0.054004f,-0.726455f,-0.89991f,0.058224f,-0.730326f,-0.842312f,0.067487f,-0.809968f,-0.828995f,0.061777f, --0.809968f,-0.828995f,0.061777f,-0.730326f,-0.842312f,0.067487f,-0.738488f,-0.760488f,0.074426f,-0.824221f,-0.752861f,0.067487f, --0.864233f,-0.822169f,0.054004f,-0.809968f,-0.828995f,0.061777f,-0.824221f,-0.752861f,0.067487f,-0.885862f,-0.749245f,0.058224f, --0.726455f,-0.89991f,0.058224f,-0.612405f,-0.916988f,0.061789f,-0.614352f,-0.854962f,0.071886f,-0.730326f,-0.842312f,0.067487f, --0.612405f,-0.916988f,0.061789f,-0.392243f,-0.928623f,0.064218f,-0.39312f,-0.8642f,0.074693f,-0.614352f,-0.854962f,0.071886f, --0.614352f,-0.854962f,0.071886f,-0.39312f,-0.8642f,0.074693f,-0.395094f,-0.775509f,0.082561f,-0.618732f,-0.768902f,0.079479f, --0.730326f,-0.842312f,0.067487f,-0.614352f,-0.854962f,0.071886f,-0.618732f,-0.768902f,0.079479f,-0.738488f,-0.760488f,0.074426f, --0.738488f,-0.760488f,0.074426f,-0.618732f,-0.768902f,0.079479f,-0.624085f,-0.648442f,0.084918f,-0.747494f,-0.64344f,0.079479f, --0.618732f,-0.768902f,0.079479f,-0.395094f,-0.775509f,0.082561f,-0.397505f,-0.652534f,0.088189f,-0.624085f,-0.648442f,0.084918f, --0.624085f,-0.648442f,0.084918f,-0.397505f,-0.652534f,0.088189f,-0.399478f,-0.422739f,0.09157f,-0.628465f,-0.420911f,0.088189f, --0.747494f,-0.64344f,0.079479f,-0.624085f,-0.648442f,0.084918f,-0.628465f,-0.420911f,0.088189f,-0.754564f,-0.418675f,0.082561f, --0.885862f,-0.749245f,0.058224f,-0.824221f,-0.752861f,0.067487f,-0.837759f,-0.639347f,0.071886f,-0.90414f,-0.637528f,0.061789f, --0.824221f,-0.752861f,0.067487f,-0.738488f,-0.760488f,0.074426f,-0.747494f,-0.64344f,0.079479f,-0.837759f,-0.639347f,0.071886f, --0.837759f,-0.639347f,0.071886f,-0.747494f,-0.64344f,0.079479f,-0.754564f,-0.418675f,0.082561f,-0.847646f,-0.416846f,0.074693f, --0.90414f,-0.637528f,0.061789f,-0.837759f,-0.639347f,0.071886f,-0.847646f,-0.416846f,0.074693f,-0.916591f,-0.416033f,0.064218f, --0.399478f,-0.422739f,0.09157f,-0.397505f,-0.652534f,0.088189f,0.002274f,-0.653898f,0.089279f,0.002265f,-0.423349f,0.092698f, --0.397505f,-0.652534f,0.088189f,-0.395094f,-0.775509f,0.082561f,0.002284f,-0.777711f,0.083588f,0.002274f,-0.653898f,0.089279f, -0.002274f,-0.653898f,0.089279f,0.002284f,-0.777711f,0.083588f,0.399509f,-0.775509f,0.082561f,0.401892f,-0.652534f,0.088189f, -0.002265f,-0.423349f,0.092698f,0.002274f,-0.653898f,0.089279f,0.401892f,-0.652534f,0.088189f,0.403842f,-0.422739f,0.09157f, --0.395094f,-0.775509f,0.082561f,-0.39312f,-0.8642f,0.074693f,0.002293f,-0.867279f,0.075629f,0.002284f,-0.777711f,0.083588f, --0.39312f,-0.8642f,0.074693f,-0.392243f,-0.928623f,0.064218f,0.002297f,-0.932501f,0.065028f,0.002293f,-0.867279f,0.075629f, -0.002293f,-0.867279f,0.075629f,0.002297f,-0.932501f,0.065028f,0.396693f,-0.928623f,0.064218f,0.397559f,-0.8642f,0.074693f, -0.002284f,-0.777711f,0.083588f,0.002293f,-0.867279f,0.075629f,0.397559f,-0.8642f,0.074693f,0.399509f,-0.775509f,0.082561f, --0.399478f,-0.422739f,0.09157f,0.002265f,-0.423349f,0.092698f,0.002263f,-0.013572f,0.093837f,-0.400136f,-0.013589f,0.092698f, -0.002265f,-0.423349f,0.092698f,0.403842f,-0.422739f,0.09157f,0.404492f,-0.013589f,0.092698f,0.002263f,-0.013572f,0.093837f, -0.002263f,-0.013572f,0.093837f,0.404492f,-0.013589f,0.092698f,0.403842f,0.396564f,0.09157f,0.002265f,0.397221f,0.092698f, --0.400136f,-0.013589f,0.092698f,0.002263f,-0.013572f,0.093837f,0.002265f,0.397221f,0.092698f,-0.399478f,0.396564f,0.09157f, --0.754564f,0.392188f,0.082561f,-0.847646f,0.390218f,0.074693f,-0.850941f,-0.013754f,0.075629f,-0.756921f,-0.013703f,0.083588f, --0.847646f,0.390218f,0.074693f,-0.916591f,0.389343f,0.064218f,-0.920742f,-0.013776f,0.065028f,-0.850941f,-0.013754f,0.075629f, --0.850941f,-0.013754f,0.075629f,-0.920742f,-0.013776f,0.065028f,-0.916591f,-0.416033f,0.064218f,-0.847646f,-0.416846f,0.074693f, --0.756921f,-0.013703f,0.083588f,-0.850941f,-0.013754f,0.075629f,-0.847646f,-0.416846f,0.074693f,-0.754564f,-0.418675f,0.082561f, --0.754564f,0.392188f,0.082561f,-0.756921f,-0.013703f,0.083588f,-0.629925f,-0.01364f,0.089279f,-0.628465f,0.394595f,0.088189f, --0.756921f,-0.013703f,0.083588f,-0.754564f,-0.418675f,0.082561f,-0.628465f,-0.420911f,0.088189f,-0.629925f,-0.01364f,0.089279f, --0.629925f,-0.01364f,0.089279f,-0.628465f,-0.420911f,0.088189f,-0.399478f,-0.422739f,0.09157f,-0.400136f,-0.013589f,0.092698f, --0.628465f,0.394595f,0.088189f,-0.629925f,-0.01364f,0.089279f,-0.400136f,-0.013589f,0.092698f,-0.399478f,0.396564f,0.09157f, --0.844501f,0.846382f,0.050154f,-0.802664f,0.865969f,0.054004f,-0.814648f,0.914535f,0.037876f,-0.871108f,0.872793f,0.036675f, --0.802664f,0.865969f,0.054004f,-0.726455f,0.887439f,0.058224f,-0.733131f,0.94538f,0.040237f,-0.814648f,0.914535f,0.037876f, --0.814648f,0.914535f,0.037876f,-0.733131f,0.94538f,0.040237f,-0.74278f,0.982563f,0.019733f,-0.830745f,0.945555f,0.018815f, --0.871108f,0.872793f,0.036675f,-0.814648f,0.914535f,0.037876f,-0.830745f,0.945555f,0.018815f,-0.894756f,0.896267f,0.018385f, --0.726455f,0.887439f,0.058224f,-0.612405f,0.905582f,0.061789f,-0.615909f,0.968735f,0.042517f,-0.733131f,0.94538f,0.040237f, --0.612405f,0.905582f,0.061789f,-0.392243f,0.917941f,0.064218f,-0.393822f,0.983443f,0.044197f,-0.615909f,0.968735f,0.042517f, --0.615909f,0.968735f,0.042517f,-0.393822f,0.983443f,0.044197f,-0.396235f,1.025424f,0.021594f,-0.621266f,1.009264f,0.020771f, --0.733131f,0.94538f,0.040237f,-0.615909f,0.968735f,0.042517f,-0.621266f,1.009264f,0.020771f,-0.74278f,0.982563f,0.019733f, --0.621266f,1.009264f,0.020771f,-0.396235f,1.025424f,0.021594f,-0.398382f,1.047552f,0.0f,-0.626031f,1.030658f,0.0f, --0.74278f,0.982563f,0.019733f,-0.621266f,1.009264f,0.020771f,-0.626031f,1.030658f,0.0f,-0.750636f,1.002556f,0.0f, --0.830745f,0.945555f,0.018815f,-0.74278f,0.982563f,0.019733f,-0.750636f,1.002556f,0.0f,-0.842153f,0.963302f,0.0f, --0.894756f,0.896267f,0.018385f,-0.830745f,0.945555f,0.018815f,-0.842153f,0.963302f,0.0f,-0.909674f,0.911075f,0.0f, --0.398382f,1.047552f,0.0f,-0.396235f,1.025424f,0.021594f,0.002279f,1.030811f,0.021869f,0.00227f,1.053183f,0.0f, -0.002279f,1.030811f,0.021869f,-0.396235f,1.025424f,0.021594f,-0.393822f,0.983443f,0.044197f,0.00229f,0.988345f,0.044757f, -0.400637f,1.025424f,0.021594f,0.002279f,1.030811f,0.021869f,0.00229f,0.988345f,0.044757f,0.398253f,0.983443f,0.044197f, -0.00227f,1.053183f,0.0f,0.002279f,1.030811f,0.021869f,0.400637f,1.025424f,0.021594f,0.402758f,1.047552f,0.0f, --0.393822f,0.983443f,0.044197f,-0.392243f,0.917941f,0.064218f,0.002297f,0.922061f,0.065028f,0.00229f,0.988345f,0.044757f, -0.00229f,0.988345f,0.044757f,0.002297f,0.922061f,0.065028f,0.396693f,0.917941f,0.064218f,0.398253f,0.983443f,0.044197f, -0.396693f,-0.928623f,0.064218f,0.002297f,-0.932501f,0.065028f,0.00229f,-0.994896f,0.044757f,0.398253f,-0.990281f,0.044197f, -0.002297f,-0.932501f,0.065028f,-0.392243f,-0.928623f,0.064218f,-0.393822f,-0.990281f,0.044197f,0.00229f,-0.994896f,0.044757f, -0.00229f,-0.994896f,0.044757f,-0.393822f,-0.990281f,0.044197f,-0.396235f,-1.0298f,0.021594f,0.002279f,-1.034871f,0.021869f, -0.398253f,-0.990281f,0.044197f,0.00229f,-0.994896f,0.044757f,0.002279f,-1.034871f,0.021869f,0.400637f,-1.0298f,0.021594f, --0.396235f,-1.0298f,0.021594f,-0.398382f,-1.050629f,0.0f,0.00227f,-1.05593f,0.0f,0.002279f,-1.034871f,0.021869f, -0.002279f,-1.034871f,0.021869f,0.00227f,-1.05593f,0.0f,0.402758f,-1.050629f,0.0f,0.400637f,-1.0298f,0.021594f, --0.909674f,-0.922159f,0.0f,-0.842153f,-0.971323f,0.0f,-0.830745f,-0.954616f,0.018815f,-0.894756f,-0.90822f,0.018385f, --0.842153f,-0.971323f,0.0f,-0.750636f,-1.008273f,0.0f,-0.74278f,-0.989453f,0.019733f,-0.830745f,-0.954616f,0.018815f, --0.830745f,-0.954616f,0.018815f,-0.74278f,-0.989453f,0.019733f,-0.733131f,-0.954452f,0.040237f,-0.814648f,-0.925416f,0.037876f, --0.894756f,-0.90822f,0.018385f,-0.830745f,-0.954616f,0.018815f,-0.814648f,-0.925416f,0.037876f,-0.871108f,-0.886124f,0.036675f, --0.750636f,-1.008273f,0.0f,-0.626031f,-1.034726f,0.0f,-0.621266f,-1.014588f,0.020771f,-0.74278f,-0.989453f,0.019733f, --0.626031f,-1.034726f,0.0f,-0.398382f,-1.050629f,0.0f,-0.396235f,-1.0298f,0.021594f,-0.621266f,-1.014588f,0.020771f, --0.621266f,-1.014588f,0.020771f,-0.396235f,-1.0298f,0.021594f,-0.393822f,-0.990281f,0.044197f,-0.615909f,-0.976437f,0.042517f, --0.74278f,-0.989453f,0.019733f,-0.621266f,-1.014588f,0.020771f,-0.615909f,-0.976437f,0.042517f,-0.733131f,-0.954452f,0.040237f, --0.615909f,-0.976437f,0.042517f,-0.393822f,-0.990281f,0.044197f,-0.392243f,-0.928623f,0.064218f,-0.612405f,-0.916988f,0.061789f, --0.733131f,-0.954452f,0.040237f,-0.615909f,-0.976437f,0.042517f,-0.612405f,-0.916988f,0.061789f,-0.726455f,-0.89991f,0.058224f, --0.814648f,-0.925416f,0.037876f,-0.733131f,-0.954452f,0.040237f,-0.726455f,-0.89991f,0.058224f,-0.802664f,-0.8797f,0.054004f, --0.871108f,-0.886124f,0.036675f,-0.814648f,-0.925416f,0.037876f,-0.802664f,-0.8797f,0.054004f,-0.844501f,-0.861263f,0.050154f, -0.846982f,-0.861263f,0.050154f,0.87333f,-0.886124f,0.036675f,0.914973f,-0.833367f,0.037876f,0.866523f,-0.822169f,0.054004f, -0.914973f,-0.833367f,0.037876f,0.87333f,-0.886124f,0.036675f,0.896749f,-0.90822f,0.018385f,0.94592f,-0.848408f,0.018815f, -0.945745f,-0.755482f,0.040237f,0.914973f,-0.833367f,0.037876f,0.94592f,-0.848408f,0.018815f,0.982841f,-0.764498f,0.019733f, -0.866523f,-0.822169f,0.054004f,0.914973f,-0.833367f,0.037876f,0.945745f,-0.755482f,0.040237f,0.887941f,-0.749245f,0.058224f, -0.896749f,-0.90822f,0.018385f,0.911522f,-0.922159f,0.0f,0.963626f,-0.859068f,0.0f,0.94592f,-0.848408f,0.018815f, -0.94592f,-0.848408f,0.018815f,0.963626f,-0.859068f,0.0f,1.002787f,-0.771839f,0.0f,0.982841f,-0.764498f,0.019733f, -0.945745f,-0.755482f,0.040237f,0.982841f,-0.764498f,0.019733f,1.009478f,-0.645808f,0.020771f,0.969045f,-0.640802f,0.042517f, -0.982841f,-0.764498f,0.019733f,1.002787f,-0.771839f,0.0f,1.030822f,-0.650261f,0.0f,1.009478f,-0.645808f,0.020771f, -1.009478f,-0.645808f,0.020771f,1.030822f,-0.650261f,0.0f,1.047675f,-0.421723f,0.0f,1.025601f,-0.419734f,0.021594f, -1.009478f,-0.645808f,0.020771f,1.025601f,-0.419734f,0.021594f,0.983719f,-0.417497f,0.044197f,0.969045f,-0.640802f,0.042517f, -0.887941f,-0.749245f,0.058224f,0.945745f,-0.755482f,0.040237f,0.969045f,-0.640802f,0.042517f,0.906041f,-0.637528f,0.061789f, -0.906041f,-0.637528f,0.061789f,0.969045f,-0.640802f,0.042517f,0.983719f,-0.417497f,0.044197f,0.918372f,-0.416033f,0.064218f, -0.918372f,-0.416033f,0.064218f,0.983719f,-0.417497f,0.044197f,0.98861f,-0.013736f,0.044757f,0.922482f,-0.013776f,0.065028f, -0.98861f,-0.013736f,0.044757f,0.983719f,-0.417497f,0.044197f,1.025601f,-0.419734f,0.021594f,1.030975f,-0.013673f,0.021869f, -0.983719f,0.390919f,0.044197f,0.98861f,-0.013736f,0.044757f,1.030975f,-0.013673f,0.021869f,1.025601f,0.393327f,0.021594f, -0.922482f,-0.013776f,0.065028f,0.98861f,-0.013736f,0.044757f,0.983719f,0.390919f,0.044197f,0.918372f,0.389343f,0.064218f, -1.025601f,-0.419734f,0.021594f,1.047675f,-0.421723f,0.0f,1.053293f,-0.013618f,0.0f,1.030975f,-0.013673f,0.021869f, -1.030975f,-0.013673f,0.021869f,1.053293f,-0.013618f,0.0f,1.047675f,0.39547f,0.0f,1.025601f,0.393327f,0.021594f, --0.909674f,-0.922159f,0.0f,-0.894756f,-0.90822f,0.018385f,-0.944409f,-0.848408f,0.018815f,-0.962289f,-0.859068f,0.0f, --0.944409f,-0.848408f,0.018815f,-0.894756f,-0.90822f,0.018385f,-0.871108f,-0.886124f,0.036675f,-0.913159f,-0.833367f,0.037876f, --0.981692f,-0.764498f,0.019733f,-0.944409f,-0.848408f,0.018815f,-0.913159f,-0.833367f,0.037876f,-0.944233f,-0.755482f,0.040237f, --0.962289f,-0.859068f,0.0f,-0.944409f,-0.848408f,0.018815f,-0.981692f,-0.764498f,0.019733f,-1.001834f,-0.771839f,0.0f, --0.871108f,-0.886124f,0.036675f,-0.844501f,-0.861263f,0.050154f,-0.864233f,-0.822169f,0.054004f,-0.913159f,-0.833367f,0.037876f, --0.913159f,-0.833367f,0.037876f,-0.864233f,-0.822169f,0.054004f,-0.885862f,-0.749245f,0.058224f,-0.944233f,-0.755482f,0.040237f, --0.981692f,-0.764498f,0.019733f,-0.944233f,-0.755482f,0.040237f,-0.967761f,-0.640802f,0.042517f,-1.008591f,-0.645808f,0.020771f, --0.944233f,-0.755482f,0.040237f,-0.885862f,-0.749245f,0.058224f,-0.90414f,-0.637528f,0.061789f,-0.967761f,-0.640802f,0.042517f, --0.967761f,-0.640802f,0.042517f,-0.90414f,-0.637528f,0.061789f,-0.916591f,-0.416033f,0.064218f,-0.982578f,-0.417497f,0.044197f, --0.967761f,-0.640802f,0.042517f,-0.982578f,-0.417497f,0.044197f,-1.024871f,-0.419734f,0.021594f,-1.008591f,-0.645808f,0.020771f, --1.001834f,-0.771839f,0.0f,-0.981692f,-0.764498f,0.019733f,-1.008591f,-0.645808f,0.020771f,-1.030143f,-0.650261f,0.0f, --1.030143f,-0.650261f,0.0f,-1.008591f,-0.645808f,0.020771f,-1.024871f,-0.419734f,0.021594f,-1.047163f,-0.421723f,0.0f, --1.047163f,0.39547f,0.0f,-1.052836f,-0.013618f,0.0f,-1.030298f,-0.013673f,0.021869f,-1.024871f,0.393327f,0.021594f, --1.052836f,-0.013618f,0.0f,-1.047163f,-0.421723f,0.0f,-1.024871f,-0.419734f,0.021594f,-1.030298f,-0.013673f,0.021869f, --1.030298f,-0.013673f,0.021869f,-1.024871f,-0.419734f,0.021594f,-0.982578f,-0.417497f,0.044197f,-0.987517f,-0.013736f,0.044757f, --1.024871f,0.393327f,0.021594f,-1.030298f,-0.013673f,0.021869f,-0.987517f,-0.013736f,0.044757f,-0.982578f,0.390919f,0.044197f, --0.982578f,-0.417497f,0.044197f,-0.916591f,-0.416033f,0.064218f,-0.920742f,-0.013776f,0.065028f,-0.987517f,-0.013736f,0.044757f, --0.987517f,-0.013736f,0.044757f,-0.920742f,-0.013776f,0.065028f,-0.916591f,0.389343f,0.064218f,-0.982578f,0.390919f,0.044197f, -0.396693f,0.917941f,0.064218f,0.616423f,0.905582f,0.061789f,0.619893f,0.968735f,0.042517f,0.398253f,0.983443f,0.044197f, -0.616423f,0.905582f,0.061789f,0.729904f,0.887439f,0.058224f,0.736514f,0.94538f,0.040237f,0.619893f,0.968735f,0.042517f, -0.619893f,0.968735f,0.042517f,0.736514f,0.94538f,0.040237f,0.746069f,0.982563f,0.019733f,0.625198f,1.009264f,0.020771f, -0.400637f,1.025424f,0.021594f,0.398253f,0.983443f,0.044197f,0.619893f,0.968735f,0.042517f,0.625198f,1.009264f,0.020771f, -0.729904f,0.887439f,0.058224f,0.805551f,0.865969f,0.054004f,0.817418f,0.914535f,0.037876f,0.736514f,0.94538f,0.040237f, -0.805551f,0.865969f,0.054004f,0.846982f,0.846382f,0.050154f,0.87333f,0.872793f,0.036675f,0.817418f,0.914535f,0.037876f, -0.817418f,0.914535f,0.037876f,0.87333f,0.872793f,0.036675f,0.896749f,0.896267f,0.018385f,0.833359f,0.945555f,0.018815f, -0.736514f,0.94538f,0.040237f,0.817418f,0.914535f,0.037876f,0.833359f,0.945555f,0.018815f,0.746069f,0.982563f,0.019733f, -0.833359f,0.945555f,0.018815f,0.896749f,0.896267f,0.018385f,0.911522f,0.911075f,0.0f,0.844656f,0.963302f,0.0f, -0.746069f,0.982563f,0.019733f,0.833359f,0.945555f,0.018815f,0.844656f,0.963302f,0.0f,0.753849f,1.002556f,0.0f, -0.625198f,1.009264f,0.020771f,0.746069f,0.982563f,0.019733f,0.753849f,1.002556f,0.0f,0.629917f,1.030658f,0.0f, -0.400637f,1.025424f,0.021594f,0.625198f,1.009264f,0.020771f,0.629917f,1.030658f,0.0f,0.402758f,1.047552f,0.0f, -0.396693f,-0.928623f,0.064218f,0.398253f,-0.990281f,0.044197f,0.619893f,-0.976437f,0.042517f,0.616423f,-0.916988f,0.061789f, -0.619893f,-0.976437f,0.042517f,0.398253f,-0.990281f,0.044197f,0.400637f,-1.0298f,0.021594f,0.625198f,-1.014588f,0.020771f, -0.736514f,-0.954452f,0.040237f,0.619893f,-0.976437f,0.042517f,0.625198f,-1.014588f,0.020771f,0.746069f,-0.989453f,0.019733f, -0.616423f,-0.916988f,0.061789f,0.619893f,-0.976437f,0.042517f,0.736514f,-0.954452f,0.040237f,0.729904f,-0.89991f,0.058224f, -0.400637f,-1.0298f,0.021594f,0.402758f,-1.050629f,0.0f,0.629917f,-1.034726f,0.0f,0.625198f,-1.014588f,0.020771f, -0.625198f,-1.014588f,0.020771f,0.629917f,-1.034726f,0.0f,0.753849f,-1.008273f,0.0f,0.746069f,-0.989453f,0.019733f, -0.736514f,-0.954452f,0.040237f,0.746069f,-0.989453f,0.019733f,0.833359f,-0.954616f,0.018815f,0.817418f,-0.925416f,0.037876f, -0.746069f,-0.989453f,0.019733f,0.753849f,-1.008273f,0.0f,0.844656f,-0.971323f,0.0f,0.833359f,-0.954616f,0.018815f, -0.833359f,-0.954616f,0.018815f,0.844656f,-0.971323f,0.0f,0.911522f,-0.922159f,0.0f,0.896749f,-0.90822f,0.018385f, -0.833359f,-0.954616f,0.018815f,0.896749f,-0.90822f,0.018385f,0.87333f,-0.886124f,0.036675f,0.817418f,-0.925416f,0.037876f, -0.729904f,-0.89991f,0.058224f,0.736514f,-0.954452f,0.040237f,0.817418f,-0.925416f,0.037876f,0.805551f,-0.8797f,0.054004f, -0.805551f,-0.8797f,0.054004f,0.817418f,-0.925416f,0.037876f,0.87333f,-0.886124f,0.036675f,0.846982f,-0.861263f,0.050154f, -0.403842f,-0.422739f,0.09157f,0.401892f,-0.652534f,0.088189f,0.62799f,-0.648441f,0.084918f,0.632327f,-0.420911f,0.088189f, -0.401892f,-0.652534f,0.088189f,0.399509f,-0.775509f,0.082561f,0.622688f,-0.768902f,0.079479f,0.62799f,-0.648441f,0.084918f, -0.62799f,-0.648441f,0.084918f,0.622688f,-0.768902f,0.079479f,0.741819f,-0.760488f,0.074426f,0.750737f,-0.64344f,0.079479f, -0.632327f,-0.420911f,0.088189f,0.62799f,-0.648441f,0.084918f,0.750737f,-0.64344f,0.079479f,0.757739f,-0.418675f,0.082561f, -0.399509f,-0.775509f,0.082561f,0.397559f,-0.8642f,0.074693f,0.618351f,-0.854962f,0.071886f,0.622688f,-0.768902f,0.079479f, -0.397559f,-0.8642f,0.074693f,0.396693f,-0.928623f,0.064218f,0.616423f,-0.916988f,0.061789f,0.618351f,-0.854962f,0.071886f, -0.618351f,-0.854962f,0.071886f,0.616423f,-0.916988f,0.061789f,0.729904f,-0.89991f,0.058224f,0.733736f,-0.842312f,0.067487f, -0.622688f,-0.768902f,0.079479f,0.618351f,-0.854962f,0.071886f,0.733736f,-0.842312f,0.067487f,0.741819f,-0.760488f,0.074426f, -0.741819f,-0.760488f,0.074426f,0.733736f,-0.842312f,0.067487f,0.812784f,-0.828995f,0.061777f,0.826898f,-0.752861f,0.067487f, -0.733736f,-0.842312f,0.067487f,0.729904f,-0.89991f,0.058224f,0.805551f,-0.8797f,0.054004f,0.812784f,-0.828995f,0.061777f, -0.812784f,-0.828995f,0.061777f,0.805551f,-0.8797f,0.054004f,0.846982f,-0.861263f,0.050154f,0.866523f,-0.822169f,0.054004f, -0.826898f,-0.752861f,0.067487f,0.812784f,-0.828995f,0.061777f,0.866523f,-0.822169f,0.054004f,0.887941f,-0.749245f,0.058224f, -0.757739f,-0.418675f,0.082561f,0.750737f,-0.64344f,0.079479f,0.840305f,-0.639347f,0.071886f,0.850096f,-0.416846f,0.074693f, -0.750737f,-0.64344f,0.079479f,0.741819f,-0.760488f,0.074426f,0.826898f,-0.752861f,0.067487f,0.840305f,-0.639347f,0.071886f, -0.840305f,-0.639347f,0.071886f,0.826898f,-0.752861f,0.067487f,0.887941f,-0.749245f,0.058224f,0.906041f,-0.637528f,0.061789f, -0.850096f,-0.416846f,0.074693f,0.840305f,-0.639347f,0.071886f,0.906041f,-0.637528f,0.061789f,0.918372f,-0.416033f,0.064218f, -0.403842f,0.396564f,0.09157f,0.404492f,-0.013589f,0.092698f,0.633773f,-0.01364f,0.08928f,0.632327f,0.394595f,0.088189f, -0.404492f,-0.013589f,0.092698f,0.403842f,-0.422739f,0.09157f,0.632327f,-0.420911f,0.088189f,0.633773f,-0.01364f,0.08928f, -0.633773f,-0.01364f,0.08928f,0.632327f,-0.420911f,0.088189f,0.757739f,-0.418675f,0.082561f,0.760073f,-0.013703f,0.083588f, -0.632327f,0.394595f,0.088189f,0.633773f,-0.01364f,0.08928f,0.760073f,-0.013703f,0.083588f,0.757739f,0.392188f,0.082561f, -0.757739f,-0.418675f,0.082561f,0.850096f,-0.416846f,0.074693f,0.853359f,-0.013754f,0.075629f,0.760073f,-0.013703f,0.083588f, -0.850096f,-0.416846f,0.074693f,0.918372f,-0.416033f,0.064218f,0.922482f,-0.013776f,0.065028f,0.853359f,-0.013754f,0.075629f, -0.853359f,-0.013754f,0.075629f,0.922482f,-0.013776f,0.065028f,0.918372f,0.389343f,0.064218f,0.850096f,0.390218f,0.074693f, -0.760073f,-0.013703f,0.083588f,0.853359f,-0.013754f,0.075629f,0.850096f,0.390218f,0.074693f,0.757739f,0.392188f,0.082561f, --1.047163f,0.39547f,0.0f,-1.024871f,0.393327f,0.021594f,-1.008591f,0.622221f,0.020771f,-1.030143f,0.626951f,0.0f, --1.008591f,0.622221f,0.020771f,-1.024871f,0.393327f,0.021594f,-0.982578f,0.390919f,0.044197f,-0.967761f,0.616903f,0.042517f, --0.981692f,0.744767f,0.019733f,-1.008591f,0.622221f,0.020771f,-0.967761f,0.616903f,0.042517f,-0.944233f,0.735189f,0.040237f, --1.030143f,0.626951f,0.0f,-1.008591f,0.622221f,0.020771f,-0.981692f,0.744767f,0.019733f,-1.001834f,0.752565f,0.0f, --0.982578f,0.390919f,0.044197f,-0.916591f,0.389343f,0.064218f,-0.90414f,0.613425f,0.061789f,-0.967761f,0.616903f,0.042517f, --0.967761f,0.616903f,0.042517f,-0.90414f,0.613425f,0.061789f,-0.885862f,0.728563f,0.058224f,-0.944233f,0.735189f,0.040237f, --0.981692f,0.744767f,0.019733f,-0.944233f,0.735189f,0.040237f,-0.913159f,0.816749f,0.037876f,-0.944409f,0.832727f,0.018815f, --0.944233f,0.735189f,0.040237f,-0.885862f,0.728563f,0.058224f,-0.864233f,0.804853f,0.054004f,-0.913159f,0.816749f,0.037876f, --0.913159f,0.816749f,0.037876f,-0.864233f,0.804853f,0.054004f,-0.844501f,0.846382f,0.050154f,-0.871108f,0.872793f,0.036675f, --0.913159f,0.816749f,0.037876f,-0.871108f,0.872793f,0.036675f,-0.894756f,0.896267f,0.018385f,-0.944409f,0.832727f,0.018815f, --1.001834f,0.752565f,0.0f,-0.981692f,0.744767f,0.019733f,-0.944409f,0.832727f,0.018815f,-0.962289f,0.844051f,0.0f, --0.962289f,0.844051f,0.0f,-0.944409f,0.832727f,0.018815f,-0.894756f,0.896267f,0.018385f,-0.909674f,0.911075f,0.0f, -0.918372f,0.389343f,0.064218f,0.983719f,0.390919f,0.044197f,0.969045f,0.616903f,0.042517f,0.906041f,0.613425f,0.061789f, -0.969045f,0.616903f,0.042517f,0.983719f,0.390919f,0.044197f,1.025601f,0.393327f,0.021594f,1.009478f,0.622221f,0.020771f, -0.945745f,0.735189f,0.040237f,0.969045f,0.616903f,0.042517f,1.009478f,0.622221f,0.020771f,0.982841f,0.744767f,0.019733f, -0.906041f,0.613425f,0.061789f,0.969045f,0.616903f,0.042517f,0.945745f,0.735189f,0.040237f,0.887941f,0.728563f,0.058224f, -1.025601f,0.393327f,0.021594f,1.047675f,0.39547f,0.0f,1.030822f,0.626951f,0.0f,1.009478f,0.622221f,0.020771f, -1.009478f,0.622221f,0.020771f,1.030822f,0.626951f,0.0f,1.002787f,0.752565f,0.0f,0.982841f,0.744767f,0.019733f, -0.945745f,0.735189f,0.040237f,0.982841f,0.744767f,0.019733f,0.94592f,0.832727f,0.018815f,0.914973f,0.816749f,0.037876f, -0.982841f,0.744767f,0.019733f,1.002787f,0.752565f,0.0f,0.963626f,0.844051f,0.0f,0.94592f,0.832727f,0.018815f, -0.94592f,0.832727f,0.018815f,0.963626f,0.844051f,0.0f,0.911522f,0.911075f,0.0f,0.896749f,0.896267f,0.018385f, -0.94592f,0.832727f,0.018815f,0.896749f,0.896267f,0.018385f,0.87333f,0.872793f,0.036675f,0.914973f,0.816749f,0.037876f, -0.887941f,0.728563f,0.058224f,0.945745f,0.735189f,0.040237f,0.914973f,0.816749f,0.037876f,0.866523f,0.804853f,0.054004f, -0.866523f,0.804853f,0.054004f,0.914973f,0.816749f,0.037876f,0.87333f,0.872793f,0.036675f,0.846982f,0.846382f,0.050154f, -0.396693f,0.917941f,0.064218f,0.397559f,0.849503f,0.074693f,0.618351f,0.83969f,0.071886f,0.616423f,0.905582f,0.061789f, -0.397559f,0.849503f,0.074693f,0.399509f,0.756465f,0.082561f,0.622688f,0.749446f,0.079479f,0.618351f,0.83969f,0.071886f, -0.618351f,0.83969f,0.071886f,0.622688f,0.749446f,0.079479f,0.741819f,0.740507f,0.074426f,0.733736f,0.826251f,0.067487f, -0.616423f,0.905582f,0.061789f,0.618351f,0.83969f,0.071886f,0.733736f,0.826251f,0.067487f,0.729904f,0.887439f,0.058224f, -0.399509f,0.756465f,0.082561f,0.401892f,0.629367f,0.088189f,0.62799f,0.625019f,0.084918f,0.622688f,0.749446f,0.079479f, -0.401892f,0.629367f,0.088189f,0.403842f,0.396564f,0.09157f,0.632327f,0.394595f,0.088189f,0.62799f,0.625019f,0.084918f, -0.62799f,0.625019f,0.084918f,0.632327f,0.394595f,0.088189f,0.757739f,0.392188f,0.082561f,0.750737f,0.619705f,0.079479f, -0.622688f,0.749446f,0.079479f,0.62799f,0.625019f,0.084918f,0.750737f,0.619705f,0.079479f,0.741819f,0.740507f,0.074426f, -0.741819f,0.740507f,0.074426f,0.750737f,0.619705f,0.079479f,0.840305f,0.615357f,0.071886f,0.826898f,0.732405f,0.067487f, -0.750737f,0.619705f,0.079479f,0.757739f,0.392188f,0.082561f,0.850096f,0.390218f,0.074693f,0.840305f,0.615357f,0.071886f, -0.840305f,0.615357f,0.071886f,0.850096f,0.390218f,0.074693f,0.918372f,0.389343f,0.064218f,0.906041f,0.613425f,0.061789f, -0.826898f,0.732405f,0.067487f,0.840305f,0.615357f,0.071886f,0.906041f,0.613425f,0.061789f,0.887941f,0.728563f,0.058224f, -0.729904f,0.887439f,0.058224f,0.733736f,0.826251f,0.067487f,0.812784f,0.812104f,0.061777f,0.805551f,0.865969f,0.054004f, -0.733736f,0.826251f,0.067487f,0.741819f,0.740507f,0.074426f,0.826898f,0.732405f,0.067487f,0.812784f,0.812104f,0.061777f, -0.812784f,0.812104f,0.061777f,0.826898f,0.732405f,0.067487f,0.887941f,0.728563f,0.058224f,0.866523f,0.804853f,0.054004f, -0.805551f,0.865969f,0.054004f,0.812784f,0.812104f,0.061777f,0.866523f,0.804853f,0.054004f,0.846982f,0.846382f,0.050154f, -0.399509f,0.756465f,0.082561f,0.397559f,0.849503f,0.074693f,0.002293f,0.852774f,0.075629f,0.002284f,0.758804f,0.083588f, -0.397559f,0.849503f,0.074693f,0.396693f,0.917941f,0.064218f,0.002297f,0.922061f,0.065028f,0.002293f,0.852774f,0.075629f, -0.002293f,0.852774f,0.075629f,0.002297f,0.922061f,0.065028f,-0.392243f,0.917941f,0.064218f,-0.39312f,0.849503f,0.074693f, -0.002284f,0.758804f,0.083588f,0.002293f,0.852774f,0.075629f,-0.39312f,0.849503f,0.074693f,-0.395094f,0.756465f,0.082561f, -0.399509f,0.756465f,0.082561f,0.002284f,0.758804f,0.083588f,0.002274f,0.630816f,0.089279f,0.401892f,0.629367f,0.088189f, -0.002284f,0.758804f,0.083588f,-0.395094f,0.756465f,0.082561f,-0.397505f,0.629367f,0.088189f,0.002274f,0.630816f,0.089279f, -0.002274f,0.630816f,0.089279f,-0.397505f,0.629367f,0.088189f,-0.399478f,0.396564f,0.09157f,0.002265f,0.397221f,0.092698f, -0.401892f,0.629367f,0.088189f,0.002274f,0.630816f,0.089279f,0.002265f,0.397221f,0.092698f,0.403842f,0.396564f,0.09157f, --0.916591f,0.389343f,0.064218f,-0.847646f,0.390218f,0.074693f,-0.837759f,0.615357f,0.071886f,-0.90414f,0.613425f,0.061789f, --0.847646f,0.390218f,0.074693f,-0.754564f,0.392188f,0.082561f,-0.747494f,0.619705f,0.079479f,-0.837759f,0.615357f,0.071886f, --0.837759f,0.615357f,0.071886f,-0.747494f,0.619705f,0.079479f,-0.738488f,0.740507f,0.074426f,-0.824221f,0.732405f,0.067487f, --0.90414f,0.613425f,0.061789f,-0.837759f,0.615357f,0.071886f,-0.824221f,0.732405f,0.067487f,-0.885862f,0.728563f,0.058224f, --0.754564f,0.392188f,0.082561f,-0.628465f,0.394595f,0.088189f,-0.624085f,0.625019f,0.084918f,-0.747494f,0.619705f,0.079479f, --0.628465f,0.394595f,0.088189f,-0.399478f,0.396564f,0.09157f,-0.397505f,0.629367f,0.088189f,-0.624085f,0.625019f,0.084918f, --0.624085f,0.625019f,0.084918f,-0.397505f,0.629367f,0.088189f,-0.395094f,0.756465f,0.082561f,-0.618732f,0.749446f,0.079479f, --0.747494f,0.619705f,0.079479f,-0.624085f,0.625019f,0.084918f,-0.618732f,0.749446f,0.079479f,-0.738488f,0.740507f,0.074426f, --0.738488f,0.740507f,0.074426f,-0.618732f,0.749446f,0.079479f,-0.614352f,0.83969f,0.071886f,-0.730326f,0.826251f,0.067487f, --0.618732f,0.749446f,0.079479f,-0.395094f,0.756465f,0.082561f,-0.39312f,0.849503f,0.074693f,-0.614352f,0.83969f,0.071886f, --0.614352f,0.83969f,0.071886f,-0.39312f,0.849503f,0.074693f,-0.392243f,0.917941f,0.064218f,-0.612405f,0.905582f,0.061789f, --0.730326f,0.826251f,0.067487f,-0.614352f,0.83969f,0.071886f,-0.612405f,0.905582f,0.061789f,-0.726455f,0.887439f,0.058224f, --0.885862f,0.728563f,0.058224f,-0.824221f,0.732405f,0.067487f,-0.809968f,0.812104f,0.061777f,-0.864233f,0.804853f,0.054004f, --0.824221f,0.732405f,0.067487f,-0.738488f,0.740507f,0.074426f,-0.730326f,0.826251f,0.067487f,-0.809968f,0.812104f,0.061777f, --0.809968f,0.812104f,0.061777f,-0.730326f,0.826251f,0.067487f,-0.726455f,0.887439f,0.058224f,-0.802664f,0.865969f,0.054004f, --0.864233f,0.804853f,0.054004f,-0.809968f,0.812104f,0.061777f,-0.802664f,0.865969f,0.054004f,-0.844501f,0.846382f,0.050154f, + -0.844501f, -0.861263f, 0.050154f, -0.802664f, -0.8797f, 0.054004f, -0.809968f, -0.828995f, 0.061777f, -0.864233f, -0.822169f, 0.054004f, + -0.802664f, -0.8797f, 0.054004f, -0.726455f, -0.89991f, 0.058224f, -0.730326f, -0.842312f, 0.067487f, -0.809968f, -0.828995f, 0.061777f, + -0.809968f, -0.828995f, 0.061777f, -0.730326f, -0.842312f, 0.067487f, -0.738488f, -0.760488f, 0.074426f, -0.824221f, -0.752861f, 0.067487f, + -0.864233f, -0.822169f, 0.054004f, -0.809968f, -0.828995f, 0.061777f, -0.824221f, -0.752861f, 0.067487f, -0.885862f, -0.749245f, 0.058224f, + -0.726455f, -0.89991f, 0.058224f, -0.612405f, -0.916988f, 0.061789f, -0.614352f, -0.854962f, 0.071886f, -0.730326f, -0.842312f, 0.067487f, + -0.612405f, -0.916988f, 0.061789f, -0.392243f, -0.928623f, 0.064218f, -0.39312f, -0.8642f, 0.074693f, -0.614352f, -0.854962f, 0.071886f, + -0.614352f, -0.854962f, 0.071886f, -0.39312f, -0.8642f, 0.074693f, -0.395094f, -0.775509f, 0.082561f, -0.618732f, -0.768902f, 0.079479f, + -0.730326f, -0.842312f, 0.067487f, -0.614352f, -0.854962f, 0.071886f, -0.618732f, -0.768902f, 0.079479f, -0.738488f, -0.760488f, 0.074426f, + -0.738488f, -0.760488f, 0.074426f, -0.618732f, -0.768902f, 0.079479f, -0.624085f, -0.648442f, 0.084918f, -0.747494f, -0.64344f, 0.079479f, + -0.618732f, -0.768902f, 0.079479f, -0.395094f, -0.775509f, 0.082561f, -0.397505f, -0.652534f, 0.088189f, -0.624085f, -0.648442f, 0.084918f, + -0.624085f, -0.648442f, 0.084918f, -0.397505f, -0.652534f, 0.088189f, -0.399478f, -0.422739f, 0.09157f, -0.628465f, -0.420911f, 0.088189f, + -0.747494f, -0.64344f, 0.079479f, -0.624085f, -0.648442f, 0.084918f, -0.628465f, -0.420911f, 0.088189f, -0.754564f, -0.418675f, 0.082561f, + -0.885862f, -0.749245f, 0.058224f, -0.824221f, -0.752861f, 0.067487f, -0.837759f, -0.639347f, 0.071886f, -0.90414f, -0.637528f, 0.061789f, + -0.824221f, -0.752861f, 0.067487f, -0.738488f, -0.760488f, 0.074426f, -0.747494f, -0.64344f, 0.079479f, -0.837759f, -0.639347f, 0.071886f, + -0.837759f, -0.639347f, 0.071886f, -0.747494f, -0.64344f, 0.079479f, -0.754564f, -0.418675f, 0.082561f, -0.847646f, -0.416846f, 0.074693f, + -0.90414f, -0.637528f, 0.061789f, -0.837759f, -0.639347f, 0.071886f, -0.847646f, -0.416846f, 0.074693f, -0.916591f, -0.416033f, 0.064218f, + -0.399478f, -0.422739f, 0.09157f, -0.397505f, -0.652534f, 0.088189f, 0.002274f, -0.653898f, 0.089279f, 0.002265f, -0.423349f, 0.092698f, + -0.397505f, -0.652534f, 0.088189f, -0.395094f, -0.775509f, 0.082561f, 0.002284f, -0.777711f, 0.083588f, 0.002274f, -0.653898f, 0.089279f, + 0.002274f, -0.653898f, 0.089279f, 0.002284f, -0.777711f, 0.083588f, 0.399509f, -0.775509f, 0.082561f, 0.401892f, -0.652534f, 0.088189f, + 0.002265f, -0.423349f, 0.092698f, 0.002274f, -0.653898f, 0.089279f, 0.401892f, -0.652534f, 0.088189f, 0.403842f, -0.422739f, 0.09157f, + -0.395094f, -0.775509f, 0.082561f, -0.39312f, -0.8642f, 0.074693f, 0.002293f, -0.867279f, 0.075629f, 0.002284f, -0.777711f, 0.083588f, + -0.39312f, -0.8642f, 0.074693f, -0.392243f, -0.928623f, 0.064218f, 0.002297f, -0.932501f, 0.065028f, 0.002293f, -0.867279f, 0.075629f, + 0.002293f, -0.867279f, 0.075629f, 0.002297f, -0.932501f, 0.065028f, 0.396693f, -0.928623f, 0.064218f, 0.397559f, -0.8642f, 0.074693f, + 0.002284f, -0.777711f, 0.083588f, 0.002293f, -0.867279f, 0.075629f, 0.397559f, -0.8642f, 0.074693f, 0.399509f, -0.775509f, 0.082561f, + -0.399478f, -0.422739f, 0.09157f, 0.002265f, -0.423349f, 0.092698f, 0.002263f, -0.013572f, 0.093837f, -0.400136f, -0.013589f, 0.092698f, + 0.002265f, -0.423349f, 0.092698f, 0.403842f, -0.422739f, 0.09157f, 0.404492f, -0.013589f, 0.092698f, 0.002263f, -0.013572f, 0.093837f, + 0.002263f, -0.013572f, 0.093837f, 0.404492f, -0.013589f, 0.092698f, 0.403842f, 0.396564f, 0.09157f, 0.002265f, 0.397221f, 0.092698f, + -0.400136f, -0.013589f, 0.092698f, 0.002263f, -0.013572f, 0.093837f, 0.002265f, 0.397221f, 0.092698f, -0.399478f, 0.396564f, 0.09157f, + -0.754564f, 0.392188f, 0.082561f, -0.847646f, 0.390218f, 0.074693f, -0.850941f, -0.013754f, 0.075629f, -0.756921f, -0.013703f, 0.083588f, + -0.847646f, 0.390218f, 0.074693f, -0.916591f, 0.389343f, 0.064218f, -0.920742f, -0.013776f, 0.065028f, -0.850941f, -0.013754f, 0.075629f, + -0.850941f, -0.013754f, 0.075629f, -0.920742f, -0.013776f, 0.065028f, -0.916591f, -0.416033f, 0.064218f, -0.847646f, -0.416846f, 0.074693f, + -0.756921f, -0.013703f, 0.083588f, -0.850941f, -0.013754f, 0.075629f, -0.847646f, -0.416846f, 0.074693f, -0.754564f, -0.418675f, 0.082561f, + -0.754564f, 0.392188f, 0.082561f, -0.756921f, -0.013703f, 0.083588f, -0.629925f, -0.01364f, 0.089279f, -0.628465f, 0.394595f, 0.088189f, + -0.756921f, -0.013703f, 0.083588f, -0.754564f, -0.418675f, 0.082561f, -0.628465f, -0.420911f, 0.088189f, -0.629925f, -0.01364f, 0.089279f, + -0.629925f, -0.01364f, 0.089279f, -0.628465f, -0.420911f, 0.088189f, -0.399478f, -0.422739f, 0.09157f, -0.400136f, -0.013589f, 0.092698f, + -0.628465f, 0.394595f, 0.088189f, -0.629925f, -0.01364f, 0.089279f, -0.400136f, -0.013589f, 0.092698f, -0.399478f, 0.396564f, 0.09157f, + -0.844501f, 0.846382f, 0.050154f, -0.802664f, 0.865969f, 0.054004f, -0.814648f, 0.914535f, 0.037876f, -0.871108f, 0.872793f, 0.036675f, + -0.802664f, 0.865969f, 0.054004f, -0.726455f, 0.887439f, 0.058224f, -0.733131f, 0.94538f, 0.040237f, -0.814648f, 0.914535f, 0.037876f, + -0.814648f, 0.914535f, 0.037876f, -0.733131f, 0.94538f, 0.040237f, -0.74278f, 0.982563f, 0.019733f, -0.830745f, 0.945555f, 0.018815f, + -0.871108f, 0.872793f, 0.036675f, -0.814648f, 0.914535f, 0.037876f, -0.830745f, 0.945555f, 0.018815f, -0.894756f, 0.896267f, 0.018385f, + -0.726455f, 0.887439f, 0.058224f, -0.612405f, 0.905582f, 0.061789f, -0.615909f, 0.968735f, 0.042517f, -0.733131f, 0.94538f, 0.040237f, + -0.612405f, 0.905582f, 0.061789f, -0.392243f, 0.917941f, 0.064218f, -0.393822f, 0.983443f, 0.044197f, -0.615909f, 0.968735f, 0.042517f, + -0.615909f, 0.968735f, 0.042517f, -0.393822f, 0.983443f, 0.044197f, -0.396235f, 1.025424f, 0.021594f, -0.621266f, 1.009264f, 0.020771f, + -0.733131f, 0.94538f, 0.040237f, -0.615909f, 0.968735f, 0.042517f, -0.621266f, 1.009264f, 0.020771f, -0.74278f, 0.982563f, 0.019733f, + -0.621266f, 1.009264f, 0.020771f, -0.396235f, 1.025424f, 0.021594f, -0.398382f, 1.047552f, 0.0f, -0.626031f, 1.030658f, 0.0f, + -0.74278f, 0.982563f, 0.019733f, -0.621266f, 1.009264f, 0.020771f, -0.626031f, 1.030658f, 0.0f, -0.750636f, 1.002556f, 0.0f, + -0.830745f, 0.945555f, 0.018815f, -0.74278f, 0.982563f, 0.019733f, -0.750636f, 1.002556f, 0.0f, -0.842153f, 0.963302f, 0.0f, + -0.894756f, 0.896267f, 0.018385f, -0.830745f, 0.945555f, 0.018815f, -0.842153f, 0.963302f, 0.0f, -0.909674f, 0.911075f, 0.0f, + -0.398382f, 1.047552f, 0.0f, -0.396235f, 1.025424f, 0.021594f, 0.002279f, 1.030811f, 0.021869f, 0.00227f, 1.053183f, 0.0f, + 0.002279f, 1.030811f, 0.021869f, -0.396235f, 1.025424f, 0.021594f, -0.393822f, 0.983443f, 0.044197f, 0.00229f, 0.988345f, 0.044757f, + 0.400637f, 1.025424f, 0.021594f, 0.002279f, 1.030811f, 0.021869f, 0.00229f, 0.988345f, 0.044757f, 0.398253f, 0.983443f, 0.044197f, + 0.00227f, 1.053183f, 0.0f, 0.002279f, 1.030811f, 0.021869f, 0.400637f, 1.025424f, 0.021594f, 0.402758f, 1.047552f, 0.0f, + -0.393822f, 0.983443f, 0.044197f, -0.392243f, 0.917941f, 0.064218f, 0.002297f, 0.922061f, 0.065028f, 0.00229f, 0.988345f, 0.044757f, + 0.00229f, 0.988345f, 0.044757f, 0.002297f, 0.922061f, 0.065028f, 0.396693f, 0.917941f, 0.064218f, 0.398253f, 0.983443f, 0.044197f, + 0.396693f, -0.928623f, 0.064218f, 0.002297f, -0.932501f, 0.065028f, 0.00229f, -0.994896f, 0.044757f, 0.398253f, -0.990281f, 0.044197f, + 0.002297f, -0.932501f, 0.065028f, -0.392243f, -0.928623f, 0.064218f, -0.393822f, -0.990281f, 0.044197f, 0.00229f, -0.994896f, 0.044757f, + 0.00229f, -0.994896f, 0.044757f, -0.393822f, -0.990281f, 0.044197f, -0.396235f, -1.0298f, 0.021594f, 0.002279f, -1.034871f, 0.021869f, + 0.398253f, -0.990281f, 0.044197f, 0.00229f, -0.994896f, 0.044757f, 0.002279f, -1.034871f, 0.021869f, 0.400637f, -1.0298f, 0.021594f, + -0.396235f, -1.0298f, 0.021594f, -0.398382f, -1.050629f, 0.0f, 0.00227f, -1.05593f, 0.0f, 0.002279f, -1.034871f, 0.021869f, + 0.002279f, -1.034871f, 0.021869f, 0.00227f, -1.05593f, 0.0f, 0.402758f, -1.050629f, 0.0f, 0.400637f, -1.0298f, 0.021594f, + -0.909674f, -0.922159f, 0.0f, -0.842153f, -0.971323f, 0.0f, -0.830745f, -0.954616f, 0.018815f, -0.894756f, -0.90822f, 0.018385f, + -0.842153f, -0.971323f, 0.0f, -0.750636f, -1.008273f, 0.0f, -0.74278f, -0.989453f, 0.019733f, -0.830745f, -0.954616f, 0.018815f, + -0.830745f, -0.954616f, 0.018815f, -0.74278f, -0.989453f, 0.019733f, -0.733131f, -0.954452f, 0.040237f, -0.814648f, -0.925416f, 0.037876f, + -0.894756f, -0.90822f, 0.018385f, -0.830745f, -0.954616f, 0.018815f, -0.814648f, -0.925416f, 0.037876f, -0.871108f, -0.886124f, 0.036675f, + -0.750636f, -1.008273f, 0.0f, -0.626031f, -1.034726f, 0.0f, -0.621266f, -1.014588f, 0.020771f, -0.74278f, -0.989453f, 0.019733f, + -0.626031f, -1.034726f, 0.0f, -0.398382f, -1.050629f, 0.0f, -0.396235f, -1.0298f, 0.021594f, -0.621266f, -1.014588f, 0.020771f, + -0.621266f, -1.014588f, 0.020771f, -0.396235f, -1.0298f, 0.021594f, -0.393822f, -0.990281f, 0.044197f, -0.615909f, -0.976437f, 0.042517f, + -0.74278f, -0.989453f, 0.019733f, -0.621266f, -1.014588f, 0.020771f, -0.615909f, -0.976437f, 0.042517f, -0.733131f, -0.954452f, 0.040237f, + -0.615909f, -0.976437f, 0.042517f, -0.393822f, -0.990281f, 0.044197f, -0.392243f, -0.928623f, 0.064218f, -0.612405f, -0.916988f, 0.061789f, + -0.733131f, -0.954452f, 0.040237f, -0.615909f, -0.976437f, 0.042517f, -0.612405f, -0.916988f, 0.061789f, -0.726455f, -0.89991f, 0.058224f, + -0.814648f, -0.925416f, 0.037876f, -0.733131f, -0.954452f, 0.040237f, -0.726455f, -0.89991f, 0.058224f, -0.802664f, -0.8797f, 0.054004f, + -0.871108f, -0.886124f, 0.036675f, -0.814648f, -0.925416f, 0.037876f, -0.802664f, -0.8797f, 0.054004f, -0.844501f, -0.861263f, 0.050154f, + 0.846982f, -0.861263f, 0.050154f, 0.87333f, -0.886124f, 0.036675f, 0.914973f, -0.833367f, 0.037876f, 0.866523f, -0.822169f, 0.054004f, + 0.914973f, -0.833367f, 0.037876f, 0.87333f, -0.886124f, 0.036675f, 0.896749f, -0.90822f, 0.018385f, 0.94592f, -0.848408f, 0.018815f, + 0.945745f, -0.755482f, 0.040237f, 0.914973f, -0.833367f, 0.037876f, 0.94592f, -0.848408f, 0.018815f, 0.982841f, -0.764498f, 0.019733f, + 0.866523f, -0.822169f, 0.054004f, 0.914973f, -0.833367f, 0.037876f, 0.945745f, -0.755482f, 0.040237f, 0.887941f, -0.749245f, 0.058224f, + 0.896749f, -0.90822f, 0.018385f, 0.911522f, -0.922159f, 0.0f, 0.963626f, -0.859068f, 0.0f, 0.94592f, -0.848408f, 0.018815f, + 0.94592f, -0.848408f, 0.018815f, 0.963626f, -0.859068f, 0.0f, 1.002787f, -0.771839f, 0.0f, 0.982841f, -0.764498f, 0.019733f, + 0.945745f, -0.755482f, 0.040237f, 0.982841f, -0.764498f, 0.019733f, 1.009478f, -0.645808f, 0.020771f, 0.969045f, -0.640802f, 0.042517f, + 0.982841f, -0.764498f, 0.019733f, 1.002787f, -0.771839f, 0.0f, 1.030822f, -0.650261f, 0.0f, 1.009478f, -0.645808f, 0.020771f, + 1.009478f, -0.645808f, 0.020771f, 1.030822f, -0.650261f, 0.0f, 1.047675f, -0.421723f, 0.0f, 1.025601f, -0.419734f, 0.021594f, + 1.009478f, -0.645808f, 0.020771f, 1.025601f, -0.419734f, 0.021594f, 0.983719f, -0.417497f, 0.044197f, 0.969045f, -0.640802f, 0.042517f, + 0.887941f, -0.749245f, 0.058224f, 0.945745f, -0.755482f, 0.040237f, 0.969045f, -0.640802f, 0.042517f, 0.906041f, -0.637528f, 0.061789f, + 0.906041f, -0.637528f, 0.061789f, 0.969045f, -0.640802f, 0.042517f, 0.983719f, -0.417497f, 0.044197f, 0.918372f, -0.416033f, 0.064218f, + 0.918372f, -0.416033f, 0.064218f, 0.983719f, -0.417497f, 0.044197f, 0.98861f, -0.013736f, 0.044757f, 0.922482f, -0.013776f, 0.065028f, + 0.98861f, -0.013736f, 0.044757f, 0.983719f, -0.417497f, 0.044197f, 1.025601f, -0.419734f, 0.021594f, 1.030975f, -0.013673f, 0.021869f, + 0.983719f, 0.390919f, 0.044197f, 0.98861f, -0.013736f, 0.044757f, 1.030975f, -0.013673f, 0.021869f, 1.025601f, 0.393327f, 0.021594f, + 0.922482f, -0.013776f, 0.065028f, 0.98861f, -0.013736f, 0.044757f, 0.983719f, 0.390919f, 0.044197f, 0.918372f, 0.389343f, 0.064218f, + 1.025601f, -0.419734f, 0.021594f, 1.047675f, -0.421723f, 0.0f, 1.053293f, -0.013618f, 0.0f, 1.030975f, -0.013673f, 0.021869f, + 1.030975f, -0.013673f, 0.021869f, 1.053293f, -0.013618f, 0.0f, 1.047675f, 0.39547f, 0.0f, 1.025601f, 0.393327f, 0.021594f, + -0.909674f, -0.922159f, 0.0f, -0.894756f, -0.90822f, 0.018385f, -0.944409f, -0.848408f, 0.018815f, -0.962289f, -0.859068f, 0.0f, + -0.944409f, -0.848408f, 0.018815f, -0.894756f, -0.90822f, 0.018385f, -0.871108f, -0.886124f, 0.036675f, -0.913159f, -0.833367f, 0.037876f, + -0.981692f, -0.764498f, 0.019733f, -0.944409f, -0.848408f, 0.018815f, -0.913159f, -0.833367f, 0.037876f, -0.944233f, -0.755482f, 0.040237f, + -0.962289f, -0.859068f, 0.0f, -0.944409f, -0.848408f, 0.018815f, -0.981692f, -0.764498f, 0.019733f, -1.001834f, -0.771839f, 0.0f, + -0.871108f, -0.886124f, 0.036675f, -0.844501f, -0.861263f, 0.050154f, -0.864233f, -0.822169f, 0.054004f, -0.913159f, -0.833367f, 0.037876f, + -0.913159f, -0.833367f, 0.037876f, -0.864233f, -0.822169f, 0.054004f, -0.885862f, -0.749245f, 0.058224f, -0.944233f, -0.755482f, 0.040237f, + -0.981692f, -0.764498f, 0.019733f, -0.944233f, -0.755482f, 0.040237f, -0.967761f, -0.640802f, 0.042517f, -1.008591f, -0.645808f, 0.020771f, + -0.944233f, -0.755482f, 0.040237f, -0.885862f, -0.749245f, 0.058224f, -0.90414f, -0.637528f, 0.061789f, -0.967761f, -0.640802f, 0.042517f, + -0.967761f, -0.640802f, 0.042517f, -0.90414f, -0.637528f, 0.061789f, -0.916591f, -0.416033f, 0.064218f, -0.982578f, -0.417497f, 0.044197f, + -0.967761f, -0.640802f, 0.042517f, -0.982578f, -0.417497f, 0.044197f, -1.024871f, -0.419734f, 0.021594f, -1.008591f, -0.645808f, 0.020771f, + -1.001834f, -0.771839f, 0.0f, -0.981692f, -0.764498f, 0.019733f, -1.008591f, -0.645808f, 0.020771f, -1.030143f, -0.650261f, 0.0f, + -1.030143f, -0.650261f, 0.0f, -1.008591f, -0.645808f, 0.020771f, -1.024871f, -0.419734f, 0.021594f, -1.047163f, -0.421723f, 0.0f, + -1.047163f, 0.39547f, 0.0f, -1.052836f, -0.013618f, 0.0f, -1.030298f, -0.013673f, 0.021869f, -1.024871f, 0.393327f, 0.021594f, + -1.052836f, -0.013618f, 0.0f, -1.047163f, -0.421723f, 0.0f, -1.024871f, -0.419734f, 0.021594f, -1.030298f, -0.013673f, 0.021869f, + -1.030298f, -0.013673f, 0.021869f, -1.024871f, -0.419734f, 0.021594f, -0.982578f, -0.417497f, 0.044197f, -0.987517f, -0.013736f, 0.044757f, + -1.024871f, 0.393327f, 0.021594f, -1.030298f, -0.013673f, 0.021869f, -0.987517f, -0.013736f, 0.044757f, -0.982578f, 0.390919f, 0.044197f, + -0.982578f, -0.417497f, 0.044197f, -0.916591f, -0.416033f, 0.064218f, -0.920742f, -0.013776f, 0.065028f, -0.987517f, -0.013736f, 0.044757f, + -0.987517f, -0.013736f, 0.044757f, -0.920742f, -0.013776f, 0.065028f, -0.916591f, 0.389343f, 0.064218f, -0.982578f, 0.390919f, 0.044197f, + 0.396693f, 0.917941f, 0.064218f, 0.616423f, 0.905582f, 0.061789f, 0.619893f, 0.968735f, 0.042517f, 0.398253f, 0.983443f, 0.044197f, + 0.616423f, 0.905582f, 0.061789f, 0.729904f, 0.887439f, 0.058224f, 0.736514f, 0.94538f, 0.040237f, 0.619893f, 0.968735f, 0.042517f, + 0.619893f, 0.968735f, 0.042517f, 0.736514f, 0.94538f, 0.040237f, 0.746069f, 0.982563f, 0.019733f, 0.625198f, 1.009264f, 0.020771f, + 0.400637f, 1.025424f, 0.021594f, 0.398253f, 0.983443f, 0.044197f, 0.619893f, 0.968735f, 0.042517f, 0.625198f, 1.009264f, 0.020771f, + 0.729904f, 0.887439f, 0.058224f, 0.805551f, 0.865969f, 0.054004f, 0.817418f, 0.914535f, 0.037876f, 0.736514f, 0.94538f, 0.040237f, + 0.805551f, 0.865969f, 0.054004f, 0.846982f, 0.846382f, 0.050154f, 0.87333f, 0.872793f, 0.036675f, 0.817418f, 0.914535f, 0.037876f, + 0.817418f, 0.914535f, 0.037876f, 0.87333f, 0.872793f, 0.036675f, 0.896749f, 0.896267f, 0.018385f, 0.833359f, 0.945555f, 0.018815f, + 0.736514f, 0.94538f, 0.040237f, 0.817418f, 0.914535f, 0.037876f, 0.833359f, 0.945555f, 0.018815f, 0.746069f, 0.982563f, 0.019733f, + 0.833359f, 0.945555f, 0.018815f, 0.896749f, 0.896267f, 0.018385f, 0.911522f, 0.911075f, 0.0f, 0.844656f, 0.963302f, 0.0f, + 0.746069f, 0.982563f, 0.019733f, 0.833359f, 0.945555f, 0.018815f, 0.844656f, 0.963302f, 0.0f, 0.753849f, 1.002556f, 0.0f, + 0.625198f, 1.009264f, 0.020771f, 0.746069f, 0.982563f, 0.019733f, 0.753849f, 1.002556f, 0.0f, 0.629917f, 1.030658f, 0.0f, + 0.400637f, 1.025424f, 0.021594f, 0.625198f, 1.009264f, 0.020771f, 0.629917f, 1.030658f, 0.0f, 0.402758f, 1.047552f, 0.0f, + 0.396693f, -0.928623f, 0.064218f, 0.398253f, -0.990281f, 0.044197f, 0.619893f, -0.976437f, 0.042517f, 0.616423f, -0.916988f, 0.061789f, + 0.619893f, -0.976437f, 0.042517f, 0.398253f, -0.990281f, 0.044197f, 0.400637f, -1.0298f, 0.021594f, 0.625198f, -1.014588f, 0.020771f, + 0.736514f, -0.954452f, 0.040237f, 0.619893f, -0.976437f, 0.042517f, 0.625198f, -1.014588f, 0.020771f, 0.746069f, -0.989453f, 0.019733f, + 0.616423f, -0.916988f, 0.061789f, 0.619893f, -0.976437f, 0.042517f, 0.736514f, -0.954452f, 0.040237f, 0.729904f, -0.89991f, 0.058224f, + 0.400637f, -1.0298f, 0.021594f, 0.402758f, -1.050629f, 0.0f, 0.629917f, -1.034726f, 0.0f, 0.625198f, -1.014588f, 0.020771f, + 0.625198f, -1.014588f, 0.020771f, 0.629917f, -1.034726f, 0.0f, 0.753849f, -1.008273f, 0.0f, 0.746069f, -0.989453f, 0.019733f, + 0.736514f, -0.954452f, 0.040237f, 0.746069f, -0.989453f, 0.019733f, 0.833359f, -0.954616f, 0.018815f, 0.817418f, -0.925416f, 0.037876f, + 0.746069f, -0.989453f, 0.019733f, 0.753849f, -1.008273f, 0.0f, 0.844656f, -0.971323f, 0.0f, 0.833359f, -0.954616f, 0.018815f, + 0.833359f, -0.954616f, 0.018815f, 0.844656f, -0.971323f, 0.0f, 0.911522f, -0.922159f, 0.0f, 0.896749f, -0.90822f, 0.018385f, + 0.833359f, -0.954616f, 0.018815f, 0.896749f, -0.90822f, 0.018385f, 0.87333f, -0.886124f, 0.036675f, 0.817418f, -0.925416f, 0.037876f, + 0.729904f, -0.89991f, 0.058224f, 0.736514f, -0.954452f, 0.040237f, 0.817418f, -0.925416f, 0.037876f, 0.805551f, -0.8797f, 0.054004f, + 0.805551f, -0.8797f, 0.054004f, 0.817418f, -0.925416f, 0.037876f, 0.87333f, -0.886124f, 0.036675f, 0.846982f, -0.861263f, 0.050154f, + 0.403842f, -0.422739f, 0.09157f, 0.401892f, -0.652534f, 0.088189f, 0.62799f, -0.648441f, 0.084918f, 0.632327f, -0.420911f, 0.088189f, + 0.401892f, -0.652534f, 0.088189f, 0.399509f, -0.775509f, 0.082561f, 0.622688f, -0.768902f, 0.079479f, 0.62799f, -0.648441f, 0.084918f, + 0.62799f, -0.648441f, 0.084918f, 0.622688f, -0.768902f, 0.079479f, 0.741819f, -0.760488f, 0.074426f, 0.750737f, -0.64344f, 0.079479f, + 0.632327f, -0.420911f, 0.088189f, 0.62799f, -0.648441f, 0.084918f, 0.750737f, -0.64344f, 0.079479f, 0.757739f, -0.418675f, 0.082561f, + 0.399509f, -0.775509f, 0.082561f, 0.397559f, -0.8642f, 0.074693f, 0.618351f, -0.854962f, 0.071886f, 0.622688f, -0.768902f, 0.079479f, + 0.397559f, -0.8642f, 0.074693f, 0.396693f, -0.928623f, 0.064218f, 0.616423f, -0.916988f, 0.061789f, 0.618351f, -0.854962f, 0.071886f, + 0.618351f, -0.854962f, 0.071886f, 0.616423f, -0.916988f, 0.061789f, 0.729904f, -0.89991f, 0.058224f, 0.733736f, -0.842312f, 0.067487f, + 0.622688f, -0.768902f, 0.079479f, 0.618351f, -0.854962f, 0.071886f, 0.733736f, -0.842312f, 0.067487f, 0.741819f, -0.760488f, 0.074426f, + 0.741819f, -0.760488f, 0.074426f, 0.733736f, -0.842312f, 0.067487f, 0.812784f, -0.828995f, 0.061777f, 0.826898f, -0.752861f, 0.067487f, + 0.733736f, -0.842312f, 0.067487f, 0.729904f, -0.89991f, 0.058224f, 0.805551f, -0.8797f, 0.054004f, 0.812784f, -0.828995f, 0.061777f, + 0.812784f, -0.828995f, 0.061777f, 0.805551f, -0.8797f, 0.054004f, 0.846982f, -0.861263f, 0.050154f, 0.866523f, -0.822169f, 0.054004f, + 0.826898f, -0.752861f, 0.067487f, 0.812784f, -0.828995f, 0.061777f, 0.866523f, -0.822169f, 0.054004f, 0.887941f, -0.749245f, 0.058224f, + 0.757739f, -0.418675f, 0.082561f, 0.750737f, -0.64344f, 0.079479f, 0.840305f, -0.639347f, 0.071886f, 0.850096f, -0.416846f, 0.074693f, + 0.750737f, -0.64344f, 0.079479f, 0.741819f, -0.760488f, 0.074426f, 0.826898f, -0.752861f, 0.067487f, 0.840305f, -0.639347f, 0.071886f, + 0.840305f, -0.639347f, 0.071886f, 0.826898f, -0.752861f, 0.067487f, 0.887941f, -0.749245f, 0.058224f, 0.906041f, -0.637528f, 0.061789f, + 0.850096f, -0.416846f, 0.074693f, 0.840305f, -0.639347f, 0.071886f, 0.906041f, -0.637528f, 0.061789f, 0.918372f, -0.416033f, 0.064218f, + 0.403842f, 0.396564f, 0.09157f, 0.404492f, -0.013589f, 0.092698f, 0.633773f, -0.01364f, 0.08928f, 0.632327f, 0.394595f, 0.088189f, + 0.404492f, -0.013589f, 0.092698f, 0.403842f, -0.422739f, 0.09157f, 0.632327f, -0.420911f, 0.088189f, 0.633773f, -0.01364f, 0.08928f, + 0.633773f, -0.01364f, 0.08928f, 0.632327f, -0.420911f, 0.088189f, 0.757739f, -0.418675f, 0.082561f, 0.760073f, -0.013703f, 0.083588f, + 0.632327f, 0.394595f, 0.088189f, 0.633773f, -0.01364f, 0.08928f, 0.760073f, -0.013703f, 0.083588f, 0.757739f, 0.392188f, 0.082561f, + 0.757739f, -0.418675f, 0.082561f, 0.850096f, -0.416846f, 0.074693f, 0.853359f, -0.013754f, 0.075629f, 0.760073f, -0.013703f, 0.083588f, + 0.850096f, -0.416846f, 0.074693f, 0.918372f, -0.416033f, 0.064218f, 0.922482f, -0.013776f, 0.065028f, 0.853359f, -0.013754f, 0.075629f, + 0.853359f, -0.013754f, 0.075629f, 0.922482f, -0.013776f, 0.065028f, 0.918372f, 0.389343f, 0.064218f, 0.850096f, 0.390218f, 0.074693f, + 0.760073f, -0.013703f, 0.083588f, 0.853359f, -0.013754f, 0.075629f, 0.850096f, 0.390218f, 0.074693f, 0.757739f, 0.392188f, 0.082561f, + -1.047163f, 0.39547f, 0.0f, -1.024871f, 0.393327f, 0.021594f, -1.008591f, 0.622221f, 0.020771f, -1.030143f, 0.626951f, 0.0f, + -1.008591f, 0.622221f, 0.020771f, -1.024871f, 0.393327f, 0.021594f, -0.982578f, 0.390919f, 0.044197f, -0.967761f, 0.616903f, 0.042517f, + -0.981692f, 0.744767f, 0.019733f, -1.008591f, 0.622221f, 0.020771f, -0.967761f, 0.616903f, 0.042517f, -0.944233f, 0.735189f, 0.040237f, + -1.030143f, 0.626951f, 0.0f, -1.008591f, 0.622221f, 0.020771f, -0.981692f, 0.744767f, 0.019733f, -1.001834f, 0.752565f, 0.0f, + -0.982578f, 0.390919f, 0.044197f, -0.916591f, 0.389343f, 0.064218f, -0.90414f, 0.613425f, 0.061789f, -0.967761f, 0.616903f, 0.042517f, + -0.967761f, 0.616903f, 0.042517f, -0.90414f, 0.613425f, 0.061789f, -0.885862f, 0.728563f, 0.058224f, -0.944233f, 0.735189f, 0.040237f, + -0.981692f, 0.744767f, 0.019733f, -0.944233f, 0.735189f, 0.040237f, -0.913159f, 0.816749f, 0.037876f, -0.944409f, 0.832727f, 0.018815f, + -0.944233f, 0.735189f, 0.040237f, -0.885862f, 0.728563f, 0.058224f, -0.864233f, 0.804853f, 0.054004f, -0.913159f, 0.816749f, 0.037876f, + -0.913159f, 0.816749f, 0.037876f, -0.864233f, 0.804853f, 0.054004f, -0.844501f, 0.846382f, 0.050154f, -0.871108f, 0.872793f, 0.036675f, + -0.913159f, 0.816749f, 0.037876f, -0.871108f, 0.872793f, 0.036675f, -0.894756f, 0.896267f, 0.018385f, -0.944409f, 0.832727f, 0.018815f, + -1.001834f, 0.752565f, 0.0f, -0.981692f, 0.744767f, 0.019733f, -0.944409f, 0.832727f, 0.018815f, -0.962289f, 0.844051f, 0.0f, + -0.962289f, 0.844051f, 0.0f, -0.944409f, 0.832727f, 0.018815f, -0.894756f, 0.896267f, 0.018385f, -0.909674f, 0.911075f, 0.0f, + 0.918372f, 0.389343f, 0.064218f, 0.983719f, 0.390919f, 0.044197f, 0.969045f, 0.616903f, 0.042517f, 0.906041f, 0.613425f, 0.061789f, + 0.969045f, 0.616903f, 0.042517f, 0.983719f, 0.390919f, 0.044197f, 1.025601f, 0.393327f, 0.021594f, 1.009478f, 0.622221f, 0.020771f, + 0.945745f, 0.735189f, 0.040237f, 0.969045f, 0.616903f, 0.042517f, 1.009478f, 0.622221f, 0.020771f, 0.982841f, 0.744767f, 0.019733f, + 0.906041f, 0.613425f, 0.061789f, 0.969045f, 0.616903f, 0.042517f, 0.945745f, 0.735189f, 0.040237f, 0.887941f, 0.728563f, 0.058224f, + 1.025601f, 0.393327f, 0.021594f, 1.047675f, 0.39547f, 0.0f, 1.030822f, 0.626951f, 0.0f, 1.009478f, 0.622221f, 0.020771f, + 1.009478f, 0.622221f, 0.020771f, 1.030822f, 0.626951f, 0.0f, 1.002787f, 0.752565f, 0.0f, 0.982841f, 0.744767f, 0.019733f, + 0.945745f, 0.735189f, 0.040237f, 0.982841f, 0.744767f, 0.019733f, 0.94592f, 0.832727f, 0.018815f, 0.914973f, 0.816749f, 0.037876f, + 0.982841f, 0.744767f, 0.019733f, 1.002787f, 0.752565f, 0.0f, 0.963626f, 0.844051f, 0.0f, 0.94592f, 0.832727f, 0.018815f, + 0.94592f, 0.832727f, 0.018815f, 0.963626f, 0.844051f, 0.0f, 0.911522f, 0.911075f, 0.0f, 0.896749f, 0.896267f, 0.018385f, + 0.94592f, 0.832727f, 0.018815f, 0.896749f, 0.896267f, 0.018385f, 0.87333f, 0.872793f, 0.036675f, 0.914973f, 0.816749f, 0.037876f, + 0.887941f, 0.728563f, 0.058224f, 0.945745f, 0.735189f, 0.040237f, 0.914973f, 0.816749f, 0.037876f, 0.866523f, 0.804853f, 0.054004f, + 0.866523f, 0.804853f, 0.054004f, 0.914973f, 0.816749f, 0.037876f, 0.87333f, 0.872793f, 0.036675f, 0.846982f, 0.846382f, 0.050154f, + 0.396693f, 0.917941f, 0.064218f, 0.397559f, 0.849503f, 0.074693f, 0.618351f, 0.83969f, 0.071886f, 0.616423f, 0.905582f, 0.061789f, + 0.397559f, 0.849503f, 0.074693f, 0.399509f, 0.756465f, 0.082561f, 0.622688f, 0.749446f, 0.079479f, 0.618351f, 0.83969f, 0.071886f, + 0.618351f, 0.83969f, 0.071886f, 0.622688f, 0.749446f, 0.079479f, 0.741819f, 0.740507f, 0.074426f, 0.733736f, 0.826251f, 0.067487f, + 0.616423f, 0.905582f, 0.061789f, 0.618351f, 0.83969f, 0.071886f, 0.733736f, 0.826251f, 0.067487f, 0.729904f, 0.887439f, 0.058224f, + 0.399509f, 0.756465f, 0.082561f, 0.401892f, 0.629367f, 0.088189f, 0.62799f, 0.625019f, 0.084918f, 0.622688f, 0.749446f, 0.079479f, + 0.401892f, 0.629367f, 0.088189f, 0.403842f, 0.396564f, 0.09157f, 0.632327f, 0.394595f, 0.088189f, 0.62799f, 0.625019f, 0.084918f, + 0.62799f, 0.625019f, 0.084918f, 0.632327f, 0.394595f, 0.088189f, 0.757739f, 0.392188f, 0.082561f, 0.750737f, 0.619705f, 0.079479f, + 0.622688f, 0.749446f, 0.079479f, 0.62799f, 0.625019f, 0.084918f, 0.750737f, 0.619705f, 0.079479f, 0.741819f, 0.740507f, 0.074426f, + 0.741819f, 0.740507f, 0.074426f, 0.750737f, 0.619705f, 0.079479f, 0.840305f, 0.615357f, 0.071886f, 0.826898f, 0.732405f, 0.067487f, + 0.750737f, 0.619705f, 0.079479f, 0.757739f, 0.392188f, 0.082561f, 0.850096f, 0.390218f, 0.074693f, 0.840305f, 0.615357f, 0.071886f, + 0.840305f, 0.615357f, 0.071886f, 0.850096f, 0.390218f, 0.074693f, 0.918372f, 0.389343f, 0.064218f, 0.906041f, 0.613425f, 0.061789f, + 0.826898f, 0.732405f, 0.067487f, 0.840305f, 0.615357f, 0.071886f, 0.906041f, 0.613425f, 0.061789f, 0.887941f, 0.728563f, 0.058224f, + 0.729904f, 0.887439f, 0.058224f, 0.733736f, 0.826251f, 0.067487f, 0.812784f, 0.812104f, 0.061777f, 0.805551f, 0.865969f, 0.054004f, + 0.733736f, 0.826251f, 0.067487f, 0.741819f, 0.740507f, 0.074426f, 0.826898f, 0.732405f, 0.067487f, 0.812784f, 0.812104f, 0.061777f, + 0.812784f, 0.812104f, 0.061777f, 0.826898f, 0.732405f, 0.067487f, 0.887941f, 0.728563f, 0.058224f, 0.866523f, 0.804853f, 0.054004f, + 0.805551f, 0.865969f, 0.054004f, 0.812784f, 0.812104f, 0.061777f, 0.866523f, 0.804853f, 0.054004f, 0.846982f, 0.846382f, 0.050154f, + 0.399509f, 0.756465f, 0.082561f, 0.397559f, 0.849503f, 0.074693f, 0.002293f, 0.852774f, 0.075629f, 0.002284f, 0.758804f, 0.083588f, + 0.397559f, 0.849503f, 0.074693f, 0.396693f, 0.917941f, 0.064218f, 0.002297f, 0.922061f, 0.065028f, 0.002293f, 0.852774f, 0.075629f, + 0.002293f, 0.852774f, 0.075629f, 0.002297f, 0.922061f, 0.065028f, -0.392243f, 0.917941f, 0.064218f, -0.39312f, 0.849503f, 0.074693f, + 0.002284f, 0.758804f, 0.083588f, 0.002293f, 0.852774f, 0.075629f, -0.39312f, 0.849503f, 0.074693f, -0.395094f, 0.756465f, 0.082561f, + 0.399509f, 0.756465f, 0.082561f, 0.002284f, 0.758804f, 0.083588f, 0.002274f, 0.630816f, 0.089279f, 0.401892f, 0.629367f, 0.088189f, + 0.002284f, 0.758804f, 0.083588f, -0.395094f, 0.756465f, 0.082561f, -0.397505f, 0.629367f, 0.088189f, 0.002274f, 0.630816f, 0.089279f, + 0.002274f, 0.630816f, 0.089279f, -0.397505f, 0.629367f, 0.088189f, -0.399478f, 0.396564f, 0.09157f, 0.002265f, 0.397221f, 0.092698f, + 0.401892f, 0.629367f, 0.088189f, 0.002274f, 0.630816f, 0.089279f, 0.002265f, 0.397221f, 0.092698f, 0.403842f, 0.396564f, 0.09157f, + -0.916591f, 0.389343f, 0.064218f, -0.847646f, 0.390218f, 0.074693f, -0.837759f, 0.615357f, 0.071886f, -0.90414f, 0.613425f, 0.061789f, + -0.847646f, 0.390218f, 0.074693f, -0.754564f, 0.392188f, 0.082561f, -0.747494f, 0.619705f, 0.079479f, -0.837759f, 0.615357f, 0.071886f, + -0.837759f, 0.615357f, 0.071886f, -0.747494f, 0.619705f, 0.079479f, -0.738488f, 0.740507f, 0.074426f, -0.824221f, 0.732405f, 0.067487f, + -0.90414f, 0.613425f, 0.061789f, -0.837759f, 0.615357f, 0.071886f, -0.824221f, 0.732405f, 0.067487f, -0.885862f, 0.728563f, 0.058224f, + -0.754564f, 0.392188f, 0.082561f, -0.628465f, 0.394595f, 0.088189f, -0.624085f, 0.625019f, 0.084918f, -0.747494f, 0.619705f, 0.079479f, + -0.628465f, 0.394595f, 0.088189f, -0.399478f, 0.396564f, 0.09157f, -0.397505f, 0.629367f, 0.088189f, -0.624085f, 0.625019f, 0.084918f, + -0.624085f, 0.625019f, 0.084918f, -0.397505f, 0.629367f, 0.088189f, -0.395094f, 0.756465f, 0.082561f, -0.618732f, 0.749446f, 0.079479f, + -0.747494f, 0.619705f, 0.079479f, -0.624085f, 0.625019f, 0.084918f, -0.618732f, 0.749446f, 0.079479f, -0.738488f, 0.740507f, 0.074426f, + -0.738488f, 0.740507f, 0.074426f, -0.618732f, 0.749446f, 0.079479f, -0.614352f, 0.83969f, 0.071886f, -0.730326f, 0.826251f, 0.067487f, + -0.618732f, 0.749446f, 0.079479f, -0.395094f, 0.756465f, 0.082561f, -0.39312f, 0.849503f, 0.074693f, -0.614352f, 0.83969f, 0.071886f, + -0.614352f, 0.83969f, 0.071886f, -0.39312f, 0.849503f, 0.074693f, -0.392243f, 0.917941f, 0.064218f, -0.612405f, 0.905582f, 0.061789f, + -0.730326f, 0.826251f, 0.067487f, -0.614352f, 0.83969f, 0.071886f, -0.612405f, 0.905582f, 0.061789f, -0.726455f, 0.887439f, 0.058224f, + -0.885862f, 0.728563f, 0.058224f, -0.824221f, 0.732405f, 0.067487f, -0.809968f, 0.812104f, 0.061777f, -0.864233f, 0.804853f, 0.054004f, + -0.824221f, 0.732405f, 0.067487f, -0.738488f, 0.740507f, 0.074426f, -0.730326f, 0.826251f, 0.067487f, -0.809968f, 0.812104f, 0.061777f, + -0.809968f, 0.812104f, 0.061777f, -0.730326f, 0.826251f, 0.067487f, -0.726455f, 0.887439f, 0.058224f, -0.802664f, 0.865969f, 0.054004f, + -0.864233f, 0.804853f, 0.054004f, -0.809968f, 0.812104f, 0.061777f, -0.802664f, 0.865969f, 0.054004f, -0.844501f, 0.846382f, 0.050154f, }; static const float cfGameIconTexCoords[] = { -0.098918f,0.907702f,0.118783f,0.916444f,0.115314f,0.892403f,0.089549f,0.889167f, -0.118783f,0.916444f,0.154967f,0.926026f,0.153129f,0.898717f,0.115314f,0.892403f, -0.115314f,0.892403f,0.153129f,0.898717f,0.149254f,0.859921f,0.108547f,0.856305f, -0.089549f,0.889167f,0.115314f,0.892403f,0.108547f,0.856305f,0.07928f,0.854591f, -0.154967f,0.926026f,0.209119f,0.934124f,0.208194f,0.904715f,0.153129f,0.898717f, -0.209119f,0.934124f,0.313652f,0.93964f,0.313236f,0.909095f,0.208194f,0.904715f, -0.208194f,0.904715f,0.313236f,0.909095f,0.312299f,0.867044f,0.206115f,0.863911f, -0.153129f,0.898717f,0.208194f,0.904715f,0.206115f,0.863911f,0.149254f,0.859921f, -0.149254f,0.859921f,0.206115f,0.863911f,0.203573f,0.806797f,0.144978f,0.804425f, -0.206115f,0.863911f,0.312299f,0.867044f,0.311154f,0.808737f,0.203573f,0.806797f, -0.203573f,0.806797f,0.311154f,0.808737f,0.310217f,0.699784f,0.201493f,0.698917f, -0.144978f,0.804425f,0.203573f,0.806797f,0.201493f,0.698917f,0.141621f,0.697857f, -0.07928f,0.854591f,0.108547f,0.856305f,0.102119f,0.802484f,0.070602f,0.801622f, -0.108547f,0.856305f,0.149254f,0.859921f,0.144978f,0.804425f,0.102119f,0.802484f, -0.102119f,0.802484f,0.144978f,0.804425f,0.141621f,0.697857f,0.097425f,0.69699f, -0.070602f,0.801622f,0.102119f,0.802484f,0.097425f,0.69699f,0.064689f,0.696604f, -0.310217f,0.699784f,0.311154f,0.808737f,0.500971f,0.809384f,0.500967f,0.700073f, -0.311154f,0.808737f,0.312299f,0.867044f,0.500976f,0.868088f,0.500971f,0.809384f, -0.500971f,0.809384f,0.500976f,0.868088f,0.68958f,0.867044f,0.690711f,0.808737f, -0.500967f,0.700073f,0.500971f,0.809384f,0.690711f,0.808737f,0.691637f,0.699784f, -0.312299f,0.867044f,0.313236f,0.909095f,0.50098f,0.910555f,0.500976f,0.868088f, -0.313236f,0.909095f,0.313652f,0.93964f,0.500982f,0.941479f,0.50098f,0.910555f, -0.50098f,0.910555f,0.500982f,0.941479f,0.688243f,0.93964f,0.688654f,0.909095f, -0.500976f,0.868088f,0.50098f,0.910555f,0.688654f,0.909095f,0.68958f,0.867044f, -0.310217f,0.699784f,0.500967f,0.700073f,0.500965f,0.505784f,0.309905f,0.505792f, -0.500967f,0.700073f,0.691637f,0.699784f,0.691946f,0.505792f,0.500965f,0.505784f, -0.500965f,0.505784f,0.691946f,0.505792f,0.691637f,0.311325f,0.500967f,0.311013f, -0.309905f,0.505792f,0.500965f,0.505784f,0.500967f,0.311013f,0.310217f,0.311325f, -0.141621f,0.3134f,0.097425f,0.314333f,0.09586f,0.50587f,0.140502f,0.505846f, -0.097425f,0.314333f,0.064689f,0.314748f,0.062719f,0.505881f,0.09586f,0.50587f, -0.09586f,0.50587f,0.062719f,0.505881f,0.064689f,0.696604f,0.097425f,0.69699f, -0.140502f,0.505846f,0.09586f,0.50587f,0.097425f,0.69699f,0.141621f,0.697857f, -0.141621f,0.3134f,0.140502f,0.505846f,0.2008f,0.505816f,0.201493f,0.312259f, -0.140502f,0.505846f,0.141621f,0.697857f,0.201493f,0.698917f,0.2008f,0.505816f, -0.2008f,0.505816f,0.201493f,0.698917f,0.310217f,0.699784f,0.309905f,0.505792f, -0.201493f,0.312259f,0.2008f,0.505816f,0.309905f,0.505792f,0.310217f,0.311325f, -0.098918f,0.098051f,0.118783f,0.088764f,0.115314f,0.070013f,0.089549f,0.088764f, -0.118783f,0.088764f,0.154967f,0.078585f,0.153129f,0.056238f,0.115314f,0.070013f, -0.115314f,0.070013f,0.153129f,0.056238f,0.14647f,0.030613f,0.104205f,0.048635f, -0.089549f,0.088764f,0.115314f,0.070013f,0.104205f,0.048635f,0.073229f,0.072587f, -0.154967f,0.078585f,0.209119f,0.069983f,0.208194f,0.045626f,0.153129f,0.056238f, -0.209119f,0.069983f,0.313652f,0.064123f,0.313236f,0.038853f,0.208194f,0.045626f, -0.208194f,0.045626f,0.313236f,0.038853f,0.31157f,0.009921f,0.204497f,0.017695f, -0.153129f,0.056238f,0.208194f,0.045626f,0.204497f,0.017695f,0.14647f,0.030613f, -0.204497f,0.017695f,0.31157f,0.009921f,0.269666f,0.0f,0.202648f,0.01068f, -0.14647f,0.030613f,0.204497f,0.017695f,0.202648f,0.01068f,0.135631f,0.02136f, -0.104205f,0.048635f,0.14647f,0.030613f,0.135631f,0.02136f,0.100033f,0.042615f, -0.073229f,0.072587f,0.104205f,0.048635f,0.100033f,0.042615f,0.064435f,0.06387f, -0.269666f,0.0f,0.31157f,0.009921f,0.500973f,0.007329f,0.500969f,0.0f, -0.500973f,0.007329f,0.31157f,0.009921f,0.313236f,0.038853f,0.50098f,0.036595f, -0.6903f,0.009921f,0.500973f,0.007329f,0.50098f,0.036595f,0.688654f,0.038853f, -0.500969f,0.0f,0.500973f,0.007329f,0.6903f,0.009921f,0.732272f,0.0f, -0.313236f,0.038853f,0.313652f,0.064123f,0.500982f,0.062169f,0.50098f,0.036595f, -0.50098f,0.036595f,0.500982f,0.062169f,0.688243f,0.064123f,0.688654f,0.038853f, -0.688243f,0.93964f,0.500982f,0.941479f,0.50098f,0.965553f,0.688654f,0.963427f, -0.500982f,0.941479f,0.313652f,0.93964f,0.313236f,0.963427f,0.50098f,0.965553f, -0.50098f,0.965553f,0.313236f,0.963427f,0.31157f,0.990661f,0.500973f,0.993101f, -0.688654f,0.963427f,0.50098f,0.965553f,0.500973f,0.993101f,0.6903f,0.990661f, -0.31157f,0.990661f,0.269666f,1.0f,0.500969f,1.0f,0.500973f,0.993101f, -0.500973f,0.993101f,0.500969f,1.0f,0.732272f,1.0f,0.6903f,0.990661f, -0.064435f,0.939877f,0.100033f,0.959885f,0.104205f,0.954218f,0.073229f,0.931672f, -0.100033f,0.959885f,0.135631f,0.979893f,0.14647f,0.971183f,0.104205f,0.954218f, -0.104205f,0.954218f,0.14647f,0.971183f,0.153129f,0.947062f,0.115314f,0.934095f, -0.073229f,0.931672f,0.104205f,0.954218f,0.115314f,0.934095f,0.089549f,0.916444f, -0.135631f,0.979893f,0.202648f,0.989946f,0.204497f,0.983343f,0.14647f,0.971183f, -0.202648f,0.989946f,0.269666f,1.0f,0.31157f,0.990661f,0.204497f,0.983343f, -0.204497f,0.983343f,0.31157f,0.990661f,0.313236f,0.963427f,0.208194f,0.957052f, -0.14647f,0.971183f,0.204497f,0.983343f,0.208194f,0.957052f,0.153129f,0.947062f, -0.208194f,0.957052f,0.313236f,0.963427f,0.313652f,0.93964f,0.209119f,0.934124f, -0.153129f,0.947062f,0.208194f,0.957052f,0.209119f,0.934124f,0.154967f,0.926026f, -0.115314f,0.934095f,0.153129f,0.947062f,0.154967f,0.926026f,0.118783f,0.916444f, -0.089549f,0.916444f,0.115314f,0.934095f,0.118783f,0.916444f,0.098918f,0.907702f, -0.902043f,0.907702f,0.91132f,0.916444f,0.930054f,0.892403f,0.91132f,0.889167f, -0.930054f,0.892403f,0.91132f,0.916444f,0.927482f,0.931672f,0.951411f,0.902768f, -0.943816f,0.856305f,0.930054f,0.892403f,0.951411f,0.902768f,0.969416f,0.862518f, -0.91132f,0.889167f,0.930054f,0.892403f,0.943816f,0.856305f,0.92149f,0.854591f, -0.927482f,0.931672f,0.93619f,0.939877f,0.957425f,0.906662f,0.951411f,0.902768f, -0.951411f,0.902768f,0.957425f,0.906662f,0.97866f,0.873446f,0.969416f,0.862518f, -0.943816f,0.856305f,0.969416f,0.862518f,0.982322f,0.805934f,0.954418f,0.802484f, -0.969416f,0.862518f,0.97866f,0.873446f,0.98933f,0.807659f,0.982322f,0.805934f, -0.982322f,0.805934f,0.98933f,0.807659f,1.0f,0.741872f,0.990089f,0.698531f, -0.982322f,0.805934f,0.990089f,0.698531f,0.961185f,0.69699f,0.954418f,0.802484f, -0.92149f,0.854591f,0.943816f,0.856305f,0.954418f,0.802484f,0.930084f,0.801622f, -0.930084f,0.801622f,0.954418f,0.802484f,0.961185f,0.69699f,0.935938f,0.696604f, -0.935938f,0.696604f,0.961185f,0.69699f,0.96344f,0.50587f,0.93789f,0.505881f, -0.96344f,0.50587f,0.961185f,0.69699f,0.990089f,0.698531f,0.992677f,0.505827f, -0.961185f,0.314333f,0.96344f,0.50587f,0.992677f,0.505827f,0.990089f,0.312674f, -0.93789f,0.505881f,0.96344f,0.50587f,0.961185f,0.314333f,0.935938f,0.314748f, -0.990089f,0.698531f,1.0f,0.741872f,1.0f,0.505805f,0.992677f,0.505827f, -0.992677f,0.505827f,1.0f,0.505805f,1.0f,0.269739f,0.990089f,0.312674f, -0.064435f,0.939877f,0.073229f,0.931672f,0.049066f,0.902768f,0.042992f,0.906662f, -0.049066f,0.902768f,0.073229f,0.931672f,0.089549f,0.916444f,0.070633f,0.892403f, -0.030884f,0.862518f,0.049066f,0.902768f,0.070633f,0.892403f,0.056735f,0.856305f, -0.042992f,0.906662f,0.049066f,0.902768f,0.030884f,0.862518f,0.021549f,0.873446f, -0.089549f,0.916444f,0.098918f,0.907702f,0.089549f,0.889167f,0.070633f,0.892403f, -0.070633f,0.892403f,0.089549f,0.889167f,0.07928f,0.854591f,0.056735f,0.856305f, -0.030884f,0.862518f,0.056735f,0.856305f,0.046029f,0.802484f,0.017852f,0.805934f, -0.056735f,0.856305f,0.07928f,0.854591f,0.070602f,0.801622f,0.046029f,0.802484f, -0.046029f,0.802484f,0.070602f,0.801622f,0.064689f,0.696604f,0.039196f,0.69699f, -0.046029f,0.802484f,0.039196f,0.69699f,0.010008f,0.698531f,0.017852f,0.805934f, -0.021549f,0.873446f,0.030884f,0.862518f,0.017852f,0.805934f,0.010774f,0.807659f, -0.010774f,0.807659f,0.017852f,0.805934f,0.010008f,0.698531f,0.0f,0.741872f, -0.0f,0.269739f,0.0f,0.505805f,0.007394f,0.505827f,0.010008f,0.312673f, -0.0f,0.505805f,0.0f,0.741872f,0.010008f,0.698531f,0.007394f,0.505827f, -0.007394f,0.505827f,0.010008f,0.698531f,0.039196f,0.69699f,0.036918f,0.50587f, -0.010008f,0.312673f,0.007394f,0.505827f,0.036918f,0.50587f,0.039196f,0.314333f, -0.039196f,0.69699f,0.064689f,0.696604f,0.062719f,0.505881f,0.036918f,0.50587f, -0.036918f,0.50587f,0.062719f,0.505881f,0.064689f,0.314748f,0.039196f,0.314333f, -0.688243f,0.064123f,0.792572f,0.069983f,0.793487f,0.045626f,0.688654f,0.038853f, -0.792572f,0.069983f,0.846453f,0.078585f,0.848273f,0.056238f,0.793487f,0.045626f, -0.793487f,0.045626f,0.848273f,0.056238f,0.854867f,0.030613f,0.797148f,0.017695f, -0.6903f,0.009921f,0.688654f,0.038853f,0.793487f,0.045626f,0.797148f,0.017695f, -0.846453f,0.078585f,0.882371f,0.088764f,0.885805f,0.070013f,0.848273f,0.056238f, -0.882371f,0.088764f,0.902043f,0.098051f,0.91132f,0.088764f,0.885805f,0.070013f, -0.885805f,0.070013f,0.91132f,0.088764f,0.927482f,0.072587f,0.896806f,0.048635f, -0.848273f,0.056238f,0.885805f,0.070013f,0.896806f,0.048635f,0.854867f,0.030613f, -0.896806f,0.048635f,0.927482f,0.072587f,0.93619f,0.06387f,0.900938f,0.042615f, -0.854867f,0.030613f,0.896806f,0.048635f,0.900938f,0.042615f,0.865686f,0.02136f, -0.797148f,0.017695f,0.854867f,0.030613f,0.865686f,0.02136f,0.798979f,0.01068f, -0.6903f,0.009921f,0.797148f,0.017695f,0.798979f,0.01068f,0.732272f,0.0f, -0.688243f,0.93964f,0.688654f,0.963427f,0.793487f,0.957052f,0.792572f,0.934124f, -0.793487f,0.957052f,0.688654f,0.963427f,0.6903f,0.990661f,0.797148f,0.983343f, -0.848273f,0.947062f,0.793487f,0.957052f,0.797148f,0.983343f,0.854867f,0.971183f, -0.792572f,0.934124f,0.793487f,0.957052f,0.848273f,0.947062f,0.846453f,0.926026f, -0.6903f,0.990661f,0.732272f,1.0f,0.798979f,0.989946f,0.797148f,0.983343f, -0.797148f,0.983343f,0.798979f,0.989946f,0.865686f,0.979893f,0.854867f,0.971183f, -0.848273f,0.947062f,0.854867f,0.971183f,0.896806f,0.954218f,0.885805f,0.934095f, -0.854867f,0.971183f,0.865686f,0.979893f,0.900938f,0.959885f,0.896806f,0.954218f, -0.896806f,0.954218f,0.900938f,0.959885f,0.93619f,0.939877f,0.927482f,0.931672f, -0.896806f,0.954218f,0.927482f,0.931672f,0.91132f,0.916444f,0.885805f,0.934095f, -0.846453f,0.926026f,0.848273f,0.947062f,0.885805f,0.934095f,0.882371f,0.916444f, -0.882371f,0.916444f,0.885805f,0.934095f,0.91132f,0.916444f,0.902043f,0.907702f, -0.691637f,0.699784f,0.690711f,0.808737f,0.798063f,0.806796f,0.800123f,0.698917f, -0.690711f,0.808737f,0.68958f,0.867044f,0.795546f,0.863911f,0.798063f,0.806796f, -0.798063f,0.806796f,0.795546f,0.863911f,0.85211f,0.859921f,0.856345f,0.804425f, -0.800123f,0.698917f,0.798063f,0.806796f,0.856345f,0.804425f,0.859669f,0.697857f, -0.68958f,0.867044f,0.688654f,0.909095f,0.793487f,0.904715f,0.795546f,0.863911f, -0.688654f,0.909095f,0.688243f,0.93964f,0.792572f,0.934124f,0.793487f,0.904715f, -0.793487f,0.904715f,0.792572f,0.934124f,0.846453f,0.926026f,0.848273f,0.898717f, -0.795546f,0.863911f,0.793487f,0.904715f,0.848273f,0.898717f,0.85211f,0.859921f, -0.85211f,0.859921f,0.848273f,0.898717f,0.885805f,0.892403f,0.892507f,0.856305f, -0.848273f,0.898717f,0.846453f,0.926026f,0.882371f,0.916444f,0.885805f,0.892403f, -0.885805f,0.892403f,0.882371f,0.916444f,0.902043f,0.907702f,0.91132f,0.889167f, -0.892507f,0.856305f,0.885805f,0.892403f,0.91132f,0.889167f,0.92149f,0.854591f, -0.859669f,0.697857f,0.856345f,0.804425f,0.898872f,0.802484f,0.903521f,0.69699f, -0.856345f,0.804425f,0.85211f,0.859921f,0.892507f,0.856305f,0.898872f,0.802484f, -0.898872f,0.802484f,0.892507f,0.856305f,0.92149f,0.854591f,0.930084f,0.801622f, -0.903521f,0.69699f,0.898872f,0.802484f,0.930084f,0.801622f,0.935938f,0.696604f, -0.691637f,0.311325f,0.691946f,0.505792f,0.800809f,0.505816f,0.800123f,0.312259f, -0.691946f,0.505792f,0.691637f,0.699784f,0.800123f,0.698917f,0.800809f,0.505816f, -0.800809f,0.505816f,0.800123f,0.698917f,0.859669f,0.697857f,0.860777f,0.505846f, -0.800123f,0.312259f,0.800809f,0.505816f,0.860777f,0.505846f,0.859669f,0.3134f, -0.859669f,0.697857f,0.903521f,0.69699f,0.90507f,0.50587f,0.860777f,0.505846f, -0.903521f,0.69699f,0.935938f,0.696604f,0.93789f,0.505881f,0.90507f,0.50587f, -0.90507f,0.50587f,0.93789f,0.505881f,0.935938f,0.314748f,0.903521f,0.314333f, -0.860777f,0.505846f,0.90507f,0.50587f,0.903521f,0.314333f,0.859669f,0.3134f, -0.0f,0.269739f,0.010008f,0.312673f,0.017852f,0.203923f,0.010774f,0.202091f, -0.017852f,0.203923f,0.010008f,0.312673f,0.039196f,0.314333f,0.046029f,0.207588f, -0.030884f,0.14549f,0.017852f,0.203923f,0.046029f,0.207588f,0.056735f,0.152091f, -0.010774f,0.202091f,0.017852f,0.203923f,0.030884f,0.14549f,0.021549f,0.134442f, -0.039196f,0.314333f,0.064689f,0.314748f,0.070602f,0.208504f,0.046029f,0.207588f, -0.046029f,0.207588f,0.070602f,0.208504f,0.07928f,0.153913f,0.056735f,0.152091f, -0.030884f,0.14549f,0.056735f,0.152091f,0.070632f,0.114303f,0.049066f,0.103292f, -0.056735f,0.152091f,0.07928f,0.153913f,0.089549f,0.117742f,0.070632f,0.114303f, -0.070632f,0.114303f,0.089549f,0.117742f,0.098918f,0.098051f,0.089549f,0.088764f, -0.070632f,0.114303f,0.089549f,0.088764f,0.073229f,0.072587f,0.049066f,0.103292f, -0.021549f,0.134442f,0.030884f,0.14549f,0.049066f,0.103292f,0.042992f,0.099156f, -0.042992f,0.099156f,0.049066f,0.103292f,0.073229f,0.072587f,0.064435f,0.06387f, -0.935938f,0.314748f,0.961185f,0.314333f,0.954418f,0.207588f,0.930084f,0.208504f, -0.954418f,0.207588f,0.961185f,0.314333f,0.990089f,0.312674f,0.982322f,0.203923f, -0.943816f,0.152092f,0.954418f,0.207588f,0.982322f,0.203923f,0.969416f,0.145491f, -0.930084f,0.208504f,0.954418f,0.207588f,0.943816f,0.152092f,0.92149f,0.153913f, -0.990089f,0.312674f,1.0f,0.269739f,0.98933f,0.202091f,0.982322f,0.203923f, -0.982322f,0.203923f,0.98933f,0.202091f,0.97866f,0.134442f,0.969416f,0.145491f, -0.943816f,0.152092f,0.969416f,0.145491f,0.951411f,0.103292f,0.930054f,0.114304f, -0.969416f,0.145491f,0.97866f,0.134442f,0.957425f,0.099156f,0.951411f,0.103292f, -0.951411f,0.103292f,0.957425f,0.099156f,0.93619f,0.06387f,0.927482f,0.072587f, -0.951411f,0.103292f,0.927482f,0.072587f,0.91132f,0.088764f,0.930054f,0.114304f, -0.92149f,0.153913f,0.943816f,0.152092f,0.930054f,0.114304f,0.91132f,0.117742f, -0.91132f,0.117742f,0.930054f,0.114304f,0.91132f,0.088764f,0.902043f,0.098051f, -0.688243f,0.064123f,0.688654f,0.096571f,0.793487f,0.101224f,0.792572f,0.069983f, -0.688654f,0.096571f,0.68958f,0.140684f,0.795546f,0.144012f,0.793487f,0.101224f, -0.793487f,0.101224f,0.795546f,0.144012f,0.85211f,0.14825f,0.848273f,0.107596f, -0.792572f,0.069983f,0.793487f,0.101224f,0.848273f,0.107596f,0.846453f,0.078585f, -0.68958f,0.140684f,0.690711f,0.200945f,0.798063f,0.203007f,0.795546f,0.144012f, -0.690711f,0.200945f,0.691637f,0.311325f,0.800123f,0.312259f,0.798063f,0.203007f, -0.798063f,0.203007f,0.800123f,0.312259f,0.859669f,0.3134f,0.856345f,0.205526f, -0.795546f,0.144012f,0.798063f,0.203007f,0.856345f,0.205526f,0.85211f,0.14825f, -0.85211f,0.14825f,0.856345f,0.205526f,0.898872f,0.207588f,0.892507f,0.152092f, -0.856345f,0.205526f,0.859669f,0.3134f,0.903521f,0.314333f,0.898872f,0.207588f, -0.898872f,0.207588f,0.903521f,0.314333f,0.935938f,0.314748f,0.930084f,0.208504f, -0.892507f,0.152092f,0.898872f,0.207588f,0.930084f,0.208504f,0.92149f,0.153913f, -0.846453f,0.078585f,0.848273f,0.107596f,0.885805f,0.114304f,0.882371f,0.088764f, -0.848273f,0.107596f,0.85211f,0.14825f,0.892507f,0.152092f,0.885805f,0.114304f, -0.885805f,0.114304f,0.892507f,0.152092f,0.92149f,0.153913f,0.91132f,0.117742f, -0.882371f,0.088764f,0.885805f,0.114304f,0.91132f,0.117742f,0.902043f,0.098051f, -0.68958f,0.140684f,0.688654f,0.096571f,0.50098f,0.095021f,0.500976f,0.139575f, -0.688654f,0.096571f,0.688243f,0.064123f,0.500982f,0.062169f,0.50098f,0.095021f, -0.50098f,0.095021f,0.500982f,0.062169f,0.313652f,0.064123f,0.313236f,0.096571f, -0.500976f,0.139575f,0.50098f,0.095021f,0.313236f,0.096571f,0.312299f,0.140684f, -0.68958f,0.140684f,0.500976f,0.139575f,0.500971f,0.200258f,0.690711f,0.200945f, -0.500976f,0.139575f,0.312299f,0.140684f,0.311154f,0.200945f,0.500971f,0.200258f, -0.500971f,0.200258f,0.311154f,0.200945f,0.310217f,0.311325f,0.500967f,0.311013f, -0.690711f,0.200945f,0.500971f,0.200258f,0.500967f,0.311013f,0.691637f,0.311325f, -0.064689f,0.314748f,0.097425f,0.314333f,0.102119f,0.207588f,0.070602f,0.208504f, -0.097425f,0.314333f,0.141621f,0.3134f,0.144978f,0.205526f,0.102119f,0.207588f, -0.102119f,0.207588f,0.144978f,0.205526f,0.149254f,0.14825f,0.108547f,0.152092f, -0.070602f,0.208504f,0.102119f,0.207588f,0.108547f,0.152092f,0.07928f,0.153913f, -0.141621f,0.3134f,0.201493f,0.312259f,0.203573f,0.203007f,0.144978f,0.205526f, -0.201493f,0.312259f,0.310217f,0.311325f,0.311154f,0.200945f,0.203573f,0.203007f, -0.203573f,0.203007f,0.311154f,0.200945f,0.312299f,0.140684f,0.206115f,0.144012f, -0.144978f,0.205526f,0.203573f,0.203007f,0.206115f,0.144012f,0.149254f,0.14825f, -0.149254f,0.14825f,0.206115f,0.144012f,0.208194f,0.101224f,0.153129f,0.107596f, -0.206115f,0.144012f,0.312299f,0.140684f,0.313236f,0.096571f,0.208194f,0.101224f, -0.208194f,0.101224f,0.313236f,0.096571f,0.313652f,0.064123f,0.209119f,0.069983f, -0.153129f,0.107596f,0.208194f,0.101224f,0.209119f,0.069983f,0.154967f,0.078585f, -0.07928f,0.153913f,0.108547f,0.152092f,0.115314f,0.114304f,0.089549f,0.117742f, -0.108547f,0.152092f,0.149254f,0.14825f,0.153129f,0.107596f,0.115314f,0.114304f, -0.115314f,0.114304f,0.153129f,0.107596f,0.154967f,0.078585f,0.118783f,0.088764f, -0.089549f,0.117742f,0.115314f,0.114304f,0.118783f,0.088764f,0.098918f,0.098051f, + 0.098918f, 0.907702f, 0.118783f, 0.916444f, 0.115314f, 0.892403f, 0.089549f, 0.889167f, + 0.118783f, 0.916444f, 0.154967f, 0.926026f, 0.153129f, 0.898717f, 0.115314f, 0.892403f, + 0.115314f, 0.892403f, 0.153129f, 0.898717f, 0.149254f, 0.859921f, 0.108547f, 0.856305f, + 0.089549f, 0.889167f, 0.115314f, 0.892403f, 0.108547f, 0.856305f, 0.07928f, 0.854591f, + 0.154967f, 0.926026f, 0.209119f, 0.934124f, 0.208194f, 0.904715f, 0.153129f, 0.898717f, + 0.209119f, 0.934124f, 0.313652f, 0.93964f, 0.313236f, 0.909095f, 0.208194f, 0.904715f, + 0.208194f, 0.904715f, 0.313236f, 0.909095f, 0.312299f, 0.867044f, 0.206115f, 0.863911f, + 0.153129f, 0.898717f, 0.208194f, 0.904715f, 0.206115f, 0.863911f, 0.149254f, 0.859921f, + 0.149254f, 0.859921f, 0.206115f, 0.863911f, 0.203573f, 0.806797f, 0.144978f, 0.804425f, + 0.206115f, 0.863911f, 0.312299f, 0.867044f, 0.311154f, 0.808737f, 0.203573f, 0.806797f, + 0.203573f, 0.806797f, 0.311154f, 0.808737f, 0.310217f, 0.699784f, 0.201493f, 0.698917f, + 0.144978f, 0.804425f, 0.203573f, 0.806797f, 0.201493f, 0.698917f, 0.141621f, 0.697857f, + 0.07928f, 0.854591f, 0.108547f, 0.856305f, 0.102119f, 0.802484f, 0.070602f, 0.801622f, + 0.108547f, 0.856305f, 0.149254f, 0.859921f, 0.144978f, 0.804425f, 0.102119f, 0.802484f, + 0.102119f, 0.802484f, 0.144978f, 0.804425f, 0.141621f, 0.697857f, 0.097425f, 0.69699f, + 0.070602f, 0.801622f, 0.102119f, 0.802484f, 0.097425f, 0.69699f, 0.064689f, 0.696604f, + 0.310217f, 0.699784f, 0.311154f, 0.808737f, 0.500971f, 0.809384f, 0.500967f, 0.700073f, + 0.311154f, 0.808737f, 0.312299f, 0.867044f, 0.500976f, 0.868088f, 0.500971f, 0.809384f, + 0.500971f, 0.809384f, 0.500976f, 0.868088f, 0.68958f, 0.867044f, 0.690711f, 0.808737f, + 0.500967f, 0.700073f, 0.500971f, 0.809384f, 0.690711f, 0.808737f, 0.691637f, 0.699784f, + 0.312299f, 0.867044f, 0.313236f, 0.909095f, 0.50098f, 0.910555f, 0.500976f, 0.868088f, + 0.313236f, 0.909095f, 0.313652f, 0.93964f, 0.500982f, 0.941479f, 0.50098f, 0.910555f, + 0.50098f, 0.910555f, 0.500982f, 0.941479f, 0.688243f, 0.93964f, 0.688654f, 0.909095f, + 0.500976f, 0.868088f, 0.50098f, 0.910555f, 0.688654f, 0.909095f, 0.68958f, 0.867044f, + 0.310217f, 0.699784f, 0.500967f, 0.700073f, 0.500965f, 0.505784f, 0.309905f, 0.505792f, + 0.500967f, 0.700073f, 0.691637f, 0.699784f, 0.691946f, 0.505792f, 0.500965f, 0.505784f, + 0.500965f, 0.505784f, 0.691946f, 0.505792f, 0.691637f, 0.311325f, 0.500967f, 0.311013f, + 0.309905f, 0.505792f, 0.500965f, 0.505784f, 0.500967f, 0.311013f, 0.310217f, 0.311325f, + 0.141621f, 0.3134f, 0.097425f, 0.314333f, 0.09586f, 0.50587f, 0.140502f, 0.505846f, + 0.097425f, 0.314333f, 0.064689f, 0.314748f, 0.062719f, 0.505881f, 0.09586f, 0.50587f, + 0.09586f, 0.50587f, 0.062719f, 0.505881f, 0.064689f, 0.696604f, 0.097425f, 0.69699f, + 0.140502f, 0.505846f, 0.09586f, 0.50587f, 0.097425f, 0.69699f, 0.141621f, 0.697857f, + 0.141621f, 0.3134f, 0.140502f, 0.505846f, 0.2008f, 0.505816f, 0.201493f, 0.312259f, + 0.140502f, 0.505846f, 0.141621f, 0.697857f, 0.201493f, 0.698917f, 0.2008f, 0.505816f, + 0.2008f, 0.505816f, 0.201493f, 0.698917f, 0.310217f, 0.699784f, 0.309905f, 0.505792f, + 0.201493f, 0.312259f, 0.2008f, 0.505816f, 0.309905f, 0.505792f, 0.310217f, 0.311325f, + 0.098918f, 0.098051f, 0.118783f, 0.088764f, 0.115314f, 0.070013f, 0.089549f, 0.088764f, + 0.118783f, 0.088764f, 0.154967f, 0.078585f, 0.153129f, 0.056238f, 0.115314f, 0.070013f, + 0.115314f, 0.070013f, 0.153129f, 0.056238f, 0.14647f, 0.030613f, 0.104205f, 0.048635f, + 0.089549f, 0.088764f, 0.115314f, 0.070013f, 0.104205f, 0.048635f, 0.073229f, 0.072587f, + 0.154967f, 0.078585f, 0.209119f, 0.069983f, 0.208194f, 0.045626f, 0.153129f, 0.056238f, + 0.209119f, 0.069983f, 0.313652f, 0.064123f, 0.313236f, 0.038853f, 0.208194f, 0.045626f, + 0.208194f, 0.045626f, 0.313236f, 0.038853f, 0.31157f, 0.009921f, 0.204497f, 0.017695f, + 0.153129f, 0.056238f, 0.208194f, 0.045626f, 0.204497f, 0.017695f, 0.14647f, 0.030613f, + 0.204497f, 0.017695f, 0.31157f, 0.009921f, 0.269666f, 0.0f, 0.202648f, 0.01068f, + 0.14647f, 0.030613f, 0.204497f, 0.017695f, 0.202648f, 0.01068f, 0.135631f, 0.02136f, + 0.104205f, 0.048635f, 0.14647f, 0.030613f, 0.135631f, 0.02136f, 0.100033f, 0.042615f, + 0.073229f, 0.072587f, 0.104205f, 0.048635f, 0.100033f, 0.042615f, 0.064435f, 0.06387f, + 0.269666f, 0.0f, 0.31157f, 0.009921f, 0.500973f, 0.007329f, 0.500969f, 0.0f, + 0.500973f, 0.007329f, 0.31157f, 0.009921f, 0.313236f, 0.038853f, 0.50098f, 0.036595f, + 0.6903f, 0.009921f, 0.500973f, 0.007329f, 0.50098f, 0.036595f, 0.688654f, 0.038853f, + 0.500969f, 0.0f, 0.500973f, 0.007329f, 0.6903f, 0.009921f, 0.732272f, 0.0f, + 0.313236f, 0.038853f, 0.313652f, 0.064123f, 0.500982f, 0.062169f, 0.50098f, 0.036595f, + 0.50098f, 0.036595f, 0.500982f, 0.062169f, 0.688243f, 0.064123f, 0.688654f, 0.038853f, + 0.688243f, 0.93964f, 0.500982f, 0.941479f, 0.50098f, 0.965553f, 0.688654f, 0.963427f, + 0.500982f, 0.941479f, 0.313652f, 0.93964f, 0.313236f, 0.963427f, 0.50098f, 0.965553f, + 0.50098f, 0.965553f, 0.313236f, 0.963427f, 0.31157f, 0.990661f, 0.500973f, 0.993101f, + 0.688654f, 0.963427f, 0.50098f, 0.965553f, 0.500973f, 0.993101f, 0.6903f, 0.990661f, + 0.31157f, 0.990661f, 0.269666f, 1.0f, 0.500969f, 1.0f, 0.500973f, 0.993101f, + 0.500973f, 0.993101f, 0.500969f, 1.0f, 0.732272f, 1.0f, 0.6903f, 0.990661f, + 0.064435f, 0.939877f, 0.100033f, 0.959885f, 0.104205f, 0.954218f, 0.073229f, 0.931672f, + 0.100033f, 0.959885f, 0.135631f, 0.979893f, 0.14647f, 0.971183f, 0.104205f, 0.954218f, + 0.104205f, 0.954218f, 0.14647f, 0.971183f, 0.153129f, 0.947062f, 0.115314f, 0.934095f, + 0.073229f, 0.931672f, 0.104205f, 0.954218f, 0.115314f, 0.934095f, 0.089549f, 0.916444f, + 0.135631f, 0.979893f, 0.202648f, 0.989946f, 0.204497f, 0.983343f, 0.14647f, 0.971183f, + 0.202648f, 0.989946f, 0.269666f, 1.0f, 0.31157f, 0.990661f, 0.204497f, 0.983343f, + 0.204497f, 0.983343f, 0.31157f, 0.990661f, 0.313236f, 0.963427f, 0.208194f, 0.957052f, + 0.14647f, 0.971183f, 0.204497f, 0.983343f, 0.208194f, 0.957052f, 0.153129f, 0.947062f, + 0.208194f, 0.957052f, 0.313236f, 0.963427f, 0.313652f, 0.93964f, 0.209119f, 0.934124f, + 0.153129f, 0.947062f, 0.208194f, 0.957052f, 0.209119f, 0.934124f, 0.154967f, 0.926026f, + 0.115314f, 0.934095f, 0.153129f, 0.947062f, 0.154967f, 0.926026f, 0.118783f, 0.916444f, + 0.089549f, 0.916444f, 0.115314f, 0.934095f, 0.118783f, 0.916444f, 0.098918f, 0.907702f, + 0.902043f, 0.907702f, 0.91132f, 0.916444f, 0.930054f, 0.892403f, 0.91132f, 0.889167f, + 0.930054f, 0.892403f, 0.91132f, 0.916444f, 0.927482f, 0.931672f, 0.951411f, 0.902768f, + 0.943816f, 0.856305f, 0.930054f, 0.892403f, 0.951411f, 0.902768f, 0.969416f, 0.862518f, + 0.91132f, 0.889167f, 0.930054f, 0.892403f, 0.943816f, 0.856305f, 0.92149f, 0.854591f, + 0.927482f, 0.931672f, 0.93619f, 0.939877f, 0.957425f, 0.906662f, 0.951411f, 0.902768f, + 0.951411f, 0.902768f, 0.957425f, 0.906662f, 0.97866f, 0.873446f, 0.969416f, 0.862518f, + 0.943816f, 0.856305f, 0.969416f, 0.862518f, 0.982322f, 0.805934f, 0.954418f, 0.802484f, + 0.969416f, 0.862518f, 0.97866f, 0.873446f, 0.98933f, 0.807659f, 0.982322f, 0.805934f, + 0.982322f, 0.805934f, 0.98933f, 0.807659f, 1.0f, 0.741872f, 0.990089f, 0.698531f, + 0.982322f, 0.805934f, 0.990089f, 0.698531f, 0.961185f, 0.69699f, 0.954418f, 0.802484f, + 0.92149f, 0.854591f, 0.943816f, 0.856305f, 0.954418f, 0.802484f, 0.930084f, 0.801622f, + 0.930084f, 0.801622f, 0.954418f, 0.802484f, 0.961185f, 0.69699f, 0.935938f, 0.696604f, + 0.935938f, 0.696604f, 0.961185f, 0.69699f, 0.96344f, 0.50587f, 0.93789f, 0.505881f, + 0.96344f, 0.50587f, 0.961185f, 0.69699f, 0.990089f, 0.698531f, 0.992677f, 0.505827f, + 0.961185f, 0.314333f, 0.96344f, 0.50587f, 0.992677f, 0.505827f, 0.990089f, 0.312674f, + 0.93789f, 0.505881f, 0.96344f, 0.50587f, 0.961185f, 0.314333f, 0.935938f, 0.314748f, + 0.990089f, 0.698531f, 1.0f, 0.741872f, 1.0f, 0.505805f, 0.992677f, 0.505827f, + 0.992677f, 0.505827f, 1.0f, 0.505805f, 1.0f, 0.269739f, 0.990089f, 0.312674f, + 0.064435f, 0.939877f, 0.073229f, 0.931672f, 0.049066f, 0.902768f, 0.042992f, 0.906662f, + 0.049066f, 0.902768f, 0.073229f, 0.931672f, 0.089549f, 0.916444f, 0.070633f, 0.892403f, + 0.030884f, 0.862518f, 0.049066f, 0.902768f, 0.070633f, 0.892403f, 0.056735f, 0.856305f, + 0.042992f, 0.906662f, 0.049066f, 0.902768f, 0.030884f, 0.862518f, 0.021549f, 0.873446f, + 0.089549f, 0.916444f, 0.098918f, 0.907702f, 0.089549f, 0.889167f, 0.070633f, 0.892403f, + 0.070633f, 0.892403f, 0.089549f, 0.889167f, 0.07928f, 0.854591f, 0.056735f, 0.856305f, + 0.030884f, 0.862518f, 0.056735f, 0.856305f, 0.046029f, 0.802484f, 0.017852f, 0.805934f, + 0.056735f, 0.856305f, 0.07928f, 0.854591f, 0.070602f, 0.801622f, 0.046029f, 0.802484f, + 0.046029f, 0.802484f, 0.070602f, 0.801622f, 0.064689f, 0.696604f, 0.039196f, 0.69699f, + 0.046029f, 0.802484f, 0.039196f, 0.69699f, 0.010008f, 0.698531f, 0.017852f, 0.805934f, + 0.021549f, 0.873446f, 0.030884f, 0.862518f, 0.017852f, 0.805934f, 0.010774f, 0.807659f, + 0.010774f, 0.807659f, 0.017852f, 0.805934f, 0.010008f, 0.698531f, 0.0f, 0.741872f, + 0.0f, 0.269739f, 0.0f, 0.505805f, 0.007394f, 0.505827f, 0.010008f, 0.312673f, + 0.0f, 0.505805f, 0.0f, 0.741872f, 0.010008f, 0.698531f, 0.007394f, 0.505827f, + 0.007394f, 0.505827f, 0.010008f, 0.698531f, 0.039196f, 0.69699f, 0.036918f, 0.50587f, + 0.010008f, 0.312673f, 0.007394f, 0.505827f, 0.036918f, 0.50587f, 0.039196f, 0.314333f, + 0.039196f, 0.69699f, 0.064689f, 0.696604f, 0.062719f, 0.505881f, 0.036918f, 0.50587f, + 0.036918f, 0.50587f, 0.062719f, 0.505881f, 0.064689f, 0.314748f, 0.039196f, 0.314333f, + 0.688243f, 0.064123f, 0.792572f, 0.069983f, 0.793487f, 0.045626f, 0.688654f, 0.038853f, + 0.792572f, 0.069983f, 0.846453f, 0.078585f, 0.848273f, 0.056238f, 0.793487f, 0.045626f, + 0.793487f, 0.045626f, 0.848273f, 0.056238f, 0.854867f, 0.030613f, 0.797148f, 0.017695f, + 0.6903f, 0.009921f, 0.688654f, 0.038853f, 0.793487f, 0.045626f, 0.797148f, 0.017695f, + 0.846453f, 0.078585f, 0.882371f, 0.088764f, 0.885805f, 0.070013f, 0.848273f, 0.056238f, + 0.882371f, 0.088764f, 0.902043f, 0.098051f, 0.91132f, 0.088764f, 0.885805f, 0.070013f, + 0.885805f, 0.070013f, 0.91132f, 0.088764f, 0.927482f, 0.072587f, 0.896806f, 0.048635f, + 0.848273f, 0.056238f, 0.885805f, 0.070013f, 0.896806f, 0.048635f, 0.854867f, 0.030613f, + 0.896806f, 0.048635f, 0.927482f, 0.072587f, 0.93619f, 0.06387f, 0.900938f, 0.042615f, + 0.854867f, 0.030613f, 0.896806f, 0.048635f, 0.900938f, 0.042615f, 0.865686f, 0.02136f, + 0.797148f, 0.017695f, 0.854867f, 0.030613f, 0.865686f, 0.02136f, 0.798979f, 0.01068f, + 0.6903f, 0.009921f, 0.797148f, 0.017695f, 0.798979f, 0.01068f, 0.732272f, 0.0f, + 0.688243f, 0.93964f, 0.688654f, 0.963427f, 0.793487f, 0.957052f, 0.792572f, 0.934124f, + 0.793487f, 0.957052f, 0.688654f, 0.963427f, 0.6903f, 0.990661f, 0.797148f, 0.983343f, + 0.848273f, 0.947062f, 0.793487f, 0.957052f, 0.797148f, 0.983343f, 0.854867f, 0.971183f, + 0.792572f, 0.934124f, 0.793487f, 0.957052f, 0.848273f, 0.947062f, 0.846453f, 0.926026f, + 0.6903f, 0.990661f, 0.732272f, 1.0f, 0.798979f, 0.989946f, 0.797148f, 0.983343f, + 0.797148f, 0.983343f, 0.798979f, 0.989946f, 0.865686f, 0.979893f, 0.854867f, 0.971183f, + 0.848273f, 0.947062f, 0.854867f, 0.971183f, 0.896806f, 0.954218f, 0.885805f, 0.934095f, + 0.854867f, 0.971183f, 0.865686f, 0.979893f, 0.900938f, 0.959885f, 0.896806f, 0.954218f, + 0.896806f, 0.954218f, 0.900938f, 0.959885f, 0.93619f, 0.939877f, 0.927482f, 0.931672f, + 0.896806f, 0.954218f, 0.927482f, 0.931672f, 0.91132f, 0.916444f, 0.885805f, 0.934095f, + 0.846453f, 0.926026f, 0.848273f, 0.947062f, 0.885805f, 0.934095f, 0.882371f, 0.916444f, + 0.882371f, 0.916444f, 0.885805f, 0.934095f, 0.91132f, 0.916444f, 0.902043f, 0.907702f, + 0.691637f, 0.699784f, 0.690711f, 0.808737f, 0.798063f, 0.806796f, 0.800123f, 0.698917f, + 0.690711f, 0.808737f, 0.68958f, 0.867044f, 0.795546f, 0.863911f, 0.798063f, 0.806796f, + 0.798063f, 0.806796f, 0.795546f, 0.863911f, 0.85211f, 0.859921f, 0.856345f, 0.804425f, + 0.800123f, 0.698917f, 0.798063f, 0.806796f, 0.856345f, 0.804425f, 0.859669f, 0.697857f, + 0.68958f, 0.867044f, 0.688654f, 0.909095f, 0.793487f, 0.904715f, 0.795546f, 0.863911f, + 0.688654f, 0.909095f, 0.688243f, 0.93964f, 0.792572f, 0.934124f, 0.793487f, 0.904715f, + 0.793487f, 0.904715f, 0.792572f, 0.934124f, 0.846453f, 0.926026f, 0.848273f, 0.898717f, + 0.795546f, 0.863911f, 0.793487f, 0.904715f, 0.848273f, 0.898717f, 0.85211f, 0.859921f, + 0.85211f, 0.859921f, 0.848273f, 0.898717f, 0.885805f, 0.892403f, 0.892507f, 0.856305f, + 0.848273f, 0.898717f, 0.846453f, 0.926026f, 0.882371f, 0.916444f, 0.885805f, 0.892403f, + 0.885805f, 0.892403f, 0.882371f, 0.916444f, 0.902043f, 0.907702f, 0.91132f, 0.889167f, + 0.892507f, 0.856305f, 0.885805f, 0.892403f, 0.91132f, 0.889167f, 0.92149f, 0.854591f, + 0.859669f, 0.697857f, 0.856345f, 0.804425f, 0.898872f, 0.802484f, 0.903521f, 0.69699f, + 0.856345f, 0.804425f, 0.85211f, 0.859921f, 0.892507f, 0.856305f, 0.898872f, 0.802484f, + 0.898872f, 0.802484f, 0.892507f, 0.856305f, 0.92149f, 0.854591f, 0.930084f, 0.801622f, + 0.903521f, 0.69699f, 0.898872f, 0.802484f, 0.930084f, 0.801622f, 0.935938f, 0.696604f, + 0.691637f, 0.311325f, 0.691946f, 0.505792f, 0.800809f, 0.505816f, 0.800123f, 0.312259f, + 0.691946f, 0.505792f, 0.691637f, 0.699784f, 0.800123f, 0.698917f, 0.800809f, 0.505816f, + 0.800809f, 0.505816f, 0.800123f, 0.698917f, 0.859669f, 0.697857f, 0.860777f, 0.505846f, + 0.800123f, 0.312259f, 0.800809f, 0.505816f, 0.860777f, 0.505846f, 0.859669f, 0.3134f, + 0.859669f, 0.697857f, 0.903521f, 0.69699f, 0.90507f, 0.50587f, 0.860777f, 0.505846f, + 0.903521f, 0.69699f, 0.935938f, 0.696604f, 0.93789f, 0.505881f, 0.90507f, 0.50587f, + 0.90507f, 0.50587f, 0.93789f, 0.505881f, 0.935938f, 0.314748f, 0.903521f, 0.314333f, + 0.860777f, 0.505846f, 0.90507f, 0.50587f, 0.903521f, 0.314333f, 0.859669f, 0.3134f, + 0.0f, 0.269739f, 0.010008f, 0.312673f, 0.017852f, 0.203923f, 0.010774f, 0.202091f, + 0.017852f, 0.203923f, 0.010008f, 0.312673f, 0.039196f, 0.314333f, 0.046029f, 0.207588f, + 0.030884f, 0.14549f, 0.017852f, 0.203923f, 0.046029f, 0.207588f, 0.056735f, 0.152091f, + 0.010774f, 0.202091f, 0.017852f, 0.203923f, 0.030884f, 0.14549f, 0.021549f, 0.134442f, + 0.039196f, 0.314333f, 0.064689f, 0.314748f, 0.070602f, 0.208504f, 0.046029f, 0.207588f, + 0.046029f, 0.207588f, 0.070602f, 0.208504f, 0.07928f, 0.153913f, 0.056735f, 0.152091f, + 0.030884f, 0.14549f, 0.056735f, 0.152091f, 0.070632f, 0.114303f, 0.049066f, 0.103292f, + 0.056735f, 0.152091f, 0.07928f, 0.153913f, 0.089549f, 0.117742f, 0.070632f, 0.114303f, + 0.070632f, 0.114303f, 0.089549f, 0.117742f, 0.098918f, 0.098051f, 0.089549f, 0.088764f, + 0.070632f, 0.114303f, 0.089549f, 0.088764f, 0.073229f, 0.072587f, 0.049066f, 0.103292f, + 0.021549f, 0.134442f, 0.030884f, 0.14549f, 0.049066f, 0.103292f, 0.042992f, 0.099156f, + 0.042992f, 0.099156f, 0.049066f, 0.103292f, 0.073229f, 0.072587f, 0.064435f, 0.06387f, + 0.935938f, 0.314748f, 0.961185f, 0.314333f, 0.954418f, 0.207588f, 0.930084f, 0.208504f, + 0.954418f, 0.207588f, 0.961185f, 0.314333f, 0.990089f, 0.312674f, 0.982322f, 0.203923f, + 0.943816f, 0.152092f, 0.954418f, 0.207588f, 0.982322f, 0.203923f, 0.969416f, 0.145491f, + 0.930084f, 0.208504f, 0.954418f, 0.207588f, 0.943816f, 0.152092f, 0.92149f, 0.153913f, + 0.990089f, 0.312674f, 1.0f, 0.269739f, 0.98933f, 0.202091f, 0.982322f, 0.203923f, + 0.982322f, 0.203923f, 0.98933f, 0.202091f, 0.97866f, 0.134442f, 0.969416f, 0.145491f, + 0.943816f, 0.152092f, 0.969416f, 0.145491f, 0.951411f, 0.103292f, 0.930054f, 0.114304f, + 0.969416f, 0.145491f, 0.97866f, 0.134442f, 0.957425f, 0.099156f, 0.951411f, 0.103292f, + 0.951411f, 0.103292f, 0.957425f, 0.099156f, 0.93619f, 0.06387f, 0.927482f, 0.072587f, + 0.951411f, 0.103292f, 0.927482f, 0.072587f, 0.91132f, 0.088764f, 0.930054f, 0.114304f, + 0.92149f, 0.153913f, 0.943816f, 0.152092f, 0.930054f, 0.114304f, 0.91132f, 0.117742f, + 0.91132f, 0.117742f, 0.930054f, 0.114304f, 0.91132f, 0.088764f, 0.902043f, 0.098051f, + 0.688243f, 0.064123f, 0.688654f, 0.096571f, 0.793487f, 0.101224f, 0.792572f, 0.069983f, + 0.688654f, 0.096571f, 0.68958f, 0.140684f, 0.795546f, 0.144012f, 0.793487f, 0.101224f, + 0.793487f, 0.101224f, 0.795546f, 0.144012f, 0.85211f, 0.14825f, 0.848273f, 0.107596f, + 0.792572f, 0.069983f, 0.793487f, 0.101224f, 0.848273f, 0.107596f, 0.846453f, 0.078585f, + 0.68958f, 0.140684f, 0.690711f, 0.200945f, 0.798063f, 0.203007f, 0.795546f, 0.144012f, + 0.690711f, 0.200945f, 0.691637f, 0.311325f, 0.800123f, 0.312259f, 0.798063f, 0.203007f, + 0.798063f, 0.203007f, 0.800123f, 0.312259f, 0.859669f, 0.3134f, 0.856345f, 0.205526f, + 0.795546f, 0.144012f, 0.798063f, 0.203007f, 0.856345f, 0.205526f, 0.85211f, 0.14825f, + 0.85211f, 0.14825f, 0.856345f, 0.205526f, 0.898872f, 0.207588f, 0.892507f, 0.152092f, + 0.856345f, 0.205526f, 0.859669f, 0.3134f, 0.903521f, 0.314333f, 0.898872f, 0.207588f, + 0.898872f, 0.207588f, 0.903521f, 0.314333f, 0.935938f, 0.314748f, 0.930084f, 0.208504f, + 0.892507f, 0.152092f, 0.898872f, 0.207588f, 0.930084f, 0.208504f, 0.92149f, 0.153913f, + 0.846453f, 0.078585f, 0.848273f, 0.107596f, 0.885805f, 0.114304f, 0.882371f, 0.088764f, + 0.848273f, 0.107596f, 0.85211f, 0.14825f, 0.892507f, 0.152092f, 0.885805f, 0.114304f, + 0.885805f, 0.114304f, 0.892507f, 0.152092f, 0.92149f, 0.153913f, 0.91132f, 0.117742f, + 0.882371f, 0.088764f, 0.885805f, 0.114304f, 0.91132f, 0.117742f, 0.902043f, 0.098051f, + 0.68958f, 0.140684f, 0.688654f, 0.096571f, 0.50098f, 0.095021f, 0.500976f, 0.139575f, + 0.688654f, 0.096571f, 0.688243f, 0.064123f, 0.500982f, 0.062169f, 0.50098f, 0.095021f, + 0.50098f, 0.095021f, 0.500982f, 0.062169f, 0.313652f, 0.064123f, 0.313236f, 0.096571f, + 0.500976f, 0.139575f, 0.50098f, 0.095021f, 0.313236f, 0.096571f, 0.312299f, 0.140684f, + 0.68958f, 0.140684f, 0.500976f, 0.139575f, 0.500971f, 0.200258f, 0.690711f, 0.200945f, + 0.500976f, 0.139575f, 0.312299f, 0.140684f, 0.311154f, 0.200945f, 0.500971f, 0.200258f, + 0.500971f, 0.200258f, 0.311154f, 0.200945f, 0.310217f, 0.311325f, 0.500967f, 0.311013f, + 0.690711f, 0.200945f, 0.500971f, 0.200258f, 0.500967f, 0.311013f, 0.691637f, 0.311325f, + 0.064689f, 0.314748f, 0.097425f, 0.314333f, 0.102119f, 0.207588f, 0.070602f, 0.208504f, + 0.097425f, 0.314333f, 0.141621f, 0.3134f, 0.144978f, 0.205526f, 0.102119f, 0.207588f, + 0.102119f, 0.207588f, 0.144978f, 0.205526f, 0.149254f, 0.14825f, 0.108547f, 0.152092f, + 0.070602f, 0.208504f, 0.102119f, 0.207588f, 0.108547f, 0.152092f, 0.07928f, 0.153913f, + 0.141621f, 0.3134f, 0.201493f, 0.312259f, 0.203573f, 0.203007f, 0.144978f, 0.205526f, + 0.201493f, 0.312259f, 0.310217f, 0.311325f, 0.311154f, 0.200945f, 0.203573f, 0.203007f, + 0.203573f, 0.203007f, 0.311154f, 0.200945f, 0.312299f, 0.140684f, 0.206115f, 0.144012f, + 0.144978f, 0.205526f, 0.203573f, 0.203007f, 0.206115f, 0.144012f, 0.149254f, 0.14825f, + 0.149254f, 0.14825f, 0.206115f, 0.144012f, 0.208194f, 0.101224f, 0.153129f, 0.107596f, + 0.206115f, 0.144012f, 0.312299f, 0.140684f, 0.313236f, 0.096571f, 0.208194f, 0.101224f, + 0.208194f, 0.101224f, 0.313236f, 0.096571f, 0.313652f, 0.064123f, 0.209119f, 0.069983f, + 0.153129f, 0.107596f, 0.208194f, 0.101224f, 0.209119f, 0.069983f, 0.154967f, 0.078585f, + 0.07928f, 0.153913f, 0.108547f, 0.152092f, 0.115314f, 0.114304f, 0.089549f, 0.117742f, + 0.108547f, 0.152092f, 0.149254f, 0.14825f, 0.153129f, 0.107596f, 0.115314f, 0.114304f, + 0.115314f, 0.114304f, 0.153129f, 0.107596f, 0.154967f, 0.078585f, 0.118783f, 0.088764f, + 0.089549f, 0.117742f, 0.115314f, 0.114304f, 0.118783f, 0.088764f, 0.098918f, 0.098051f, }; static const float cfGameIconNormals[] = { --0.210457f,-0.226211f,0.951071f,-0.137777f,-0.231234f,0.963093f,-0.113627f,-0.120055f,0.986243f,-0.216181f,-0.146015f,0.965373f, --0.137777f,-0.231234f,0.963093f,-0.083714f,-0.234126f,0.968595f,-0.06603f,-0.119508f,0.990635f,-0.113627f,-0.120055f,0.986243f, --0.113627f,-0.120055f,0.986243f,-0.06603f,-0.119508f,0.990635f,-0.062379f,-0.064577f,0.995961f,-0.113032f,-0.068284f,0.991242f, --0.216181f,-0.146015f,0.965373f,-0.113627f,-0.120055f,0.986243f,-0.113032f,-0.068284f,0.991242f,-0.219508f,-0.086774f,0.971744f, --0.083714f,-0.234126f,0.968595f,-0.036722f,-0.235389f,0.971207f,-0.028482f,-0.119193f,0.992463f,-0.06603f,-0.119508f,0.990635f, --0.036722f,-0.235389f,0.971207f,-0.010823f,-0.235649f,0.971778f,-0.008321f,-0.119124f,0.992845f,-0.028482f,-0.119193f,0.992463f, --0.028482f,-0.119193f,0.992463f,-0.008321f,-0.119124f,0.992845f,-0.007465f,-0.063717f,0.99794f,-0.026099f,-0.06375f,0.997625f, --0.06603f,-0.119508f,0.990635f,-0.028482f,-0.119193f,0.992463f,-0.026099f,-0.06375f,0.997625f,-0.062379f,-0.064577f,0.995961f, --0.062379f,-0.064577f,0.995961f,-0.026099f,-0.06375f,0.997625f,-0.025391f,-0.025563f,0.999351f,-0.061589f,-0.026301f,0.997755f, --0.026099f,-0.06375f,0.997625f,-0.007465f,-0.063717f,0.99794f,-0.007172f,-0.02556f,0.999648f,-0.025391f,-0.025563f,0.999351f, --0.025391f,-0.025563f,0.999351f,-0.007172f,-0.02556f,0.999648f,-0.007161f,-0.00707f,0.999949f,-0.025395f,-0.007088f,0.999652f, --0.061589f,-0.026301f,0.997755f,-0.025391f,-0.025563f,0.999351f,-0.025395f,-0.007088f,0.999652f,-0.061548f,-0.00739f,0.998077f, --0.219508f,-0.086774f,0.971744f,-0.113032f,-0.068284f,0.991242f,-0.112752f,-0.028685f,0.993209f,-0.22077f,-0.037047f,0.974622f, --0.113032f,-0.068284f,0.991242f,-0.062379f,-0.064577f,0.995961f,-0.061589f,-0.026301f,0.997755f,-0.112752f,-0.028685f,0.993209f, --0.112752f,-0.028685f,0.993209f,-0.061589f,-0.026301f,0.997755f,-0.061548f,-0.00739f,0.998077f,-0.112673f,-0.008234f,0.993598f, --0.22077f,-0.037047f,0.974622f,-0.112752f,-0.028685f,0.993209f,-0.112673f,-0.008234f,0.993598f,-0.221f,-0.010721f,0.975215f, --0.007161f,-0.00707f,0.999949f,-0.007172f,-0.02556f,0.999648f,0.0f,-0.025624f,0.999672f,0.0f,-0.007089f,0.999975f, --0.007172f,-0.02556f,0.999648f,-0.007465f,-0.063717f,0.99794f,0.0f,-0.06378f,0.997964f,0.0f,-0.025624f,0.999672f, -0.0f,-0.025624f,0.999672f,0.0f,-0.06378f,0.997964f,0.007472f,-0.063716f,0.99794f,0.007179f,-0.025559f,0.999648f, -0.0f,-0.007089f,0.999975f,0.0f,-0.025624f,0.999672f,0.007179f,-0.025559f,0.999648f,0.007169f,-0.00707f,0.999949f, --0.007465f,-0.063717f,0.99794f,-0.008321f,-0.119124f,0.992845f,0.0f,-0.119133f,0.992878f,0.0f,-0.06378f,0.997964f, --0.008321f,-0.119124f,0.992845f,-0.010823f,-0.235649f,0.971778f,0.0f,-0.235564f,0.971859f,0.0f,-0.119133f,0.992878f, -0.0f,-0.119133f,0.992878f,0.0f,-0.235564f,0.971859f,0.010835f,-0.23565f,0.971778f,0.008329f,-0.119124f,0.992845f, -0.0f,-0.06378f,0.997964f,0.0f,-0.119133f,0.992878f,0.008329f,-0.119124f,0.992845f,0.007472f,-0.063716f,0.99794f, --0.007161f,-0.00707f,0.999949f,0.0f,-0.007089f,0.999975f,0.0f,0.0f,1.0f,-0.007181f,0.0f,0.999974f, -0.0f,-0.007089f,0.999975f,0.007169f,-0.00707f,0.999949f,0.007189f,0.0f,0.999974f,0.0f,0.0f,1.0f, -0.0f,0.0f,1.0f,0.007189f,0.0f,0.999974f,0.00717f,0.007027f,0.99995f,0.0f,0.007045f,0.999975f, --0.007181f,0.0f,0.999974f,0.0f,0.0f,1.0f,0.0f,0.007045f,0.999975f,-0.007163f,0.007027f,0.99995f, --0.061553f,0.007347f,0.998077f,-0.112675f,0.008187f,0.993598f,-0.112665f,0.0f,0.993633f,-0.061598f,0.0f,0.998101f, --0.112675f,0.008187f,0.993598f,-0.220997f,0.010655f,0.975216f,-0.220914f,-1.0E-6f,0.975293f,-0.112665f,0.0f,0.993633f, --0.112665f,0.0f,0.993633f,-0.220914f,-1.0E-6f,0.975293f,-0.221f,-0.010721f,0.975215f,-0.112673f,-0.008234f,0.993598f, --0.061598f,0.0f,0.998101f,-0.112665f,0.0f,0.993633f,-0.112673f,-0.008234f,0.993598f,-0.061548f,-0.00739f,0.998077f, --0.061553f,0.007347f,0.998077f,-0.061598f,0.0f,0.998101f,-0.025456f,0.0f,0.999676f,-0.025398f,0.007046f,0.999653f, --0.061598f,0.0f,0.998101f,-0.061548f,-0.00739f,0.998077f,-0.025395f,-0.007088f,0.999652f,-0.025456f,0.0f,0.999676f, --0.025456f,0.0f,0.999676f,-0.025395f,-0.007088f,0.999652f,-0.007161f,-0.00707f,0.999949f,-0.007181f,0.0f,0.999974f, --0.025398f,0.007046f,0.999653f,-0.025456f,0.0f,0.999676f,-0.007181f,0.0f,0.999974f,-0.007163f,0.007027f,0.99995f, --0.211482f,0.213152f,0.953856f,-0.138447f,0.218126f,0.966051f,-0.198978f,0.347214f,0.916433f,-0.296456f,0.298724f,0.907126f, --0.138447f,0.218126f,0.966051f,-0.084089f,0.221062f,0.971628f,-0.117212f,0.361162f,0.925107f,-0.198978f,0.347214f,0.916433f, --0.198978f,0.347214f,0.916433f,-0.117212f,0.361162f,0.925107f,-0.168084f,0.541107f,0.823985f,-0.282777f,0.494303f,0.822011f, --0.296456f,0.298724f,0.907126f,-0.198978f,0.347214f,0.916433f,-0.282777f,0.494303f,0.822011f,-0.402197f,0.405178f,0.821017f, --0.084089f,0.221062f,0.971628f,-0.036885f,0.222305f,0.974279f,-0.050723f,0.367918f,0.928474f,-0.117212f,0.361162f,0.925107f, --0.036885f,0.222305f,0.974279f,-0.010867f,0.22256f,0.974858f,-0.014805f,0.369601f,0.929073f,-0.050723f,0.367918f,0.928474f, --0.050723f,0.367918f,0.928474f,-0.014805f,0.369601f,0.929073f,-0.020782f,0.568602f,0.822351f,-0.072149f,0.563165f,0.823189f, --0.117212f,0.361162f,0.925107f,-0.050723f,0.367918f,0.928474f,-0.072149f,0.563165f,0.823189f,-0.168084f,0.541107f,0.823985f, --0.072149f,0.563165f,0.823189f,-0.020782f,0.568602f,0.822351f,-0.025372f,0.696348f,0.717256f,-0.088478f,0.684053f,0.724047f, --0.168084f,0.541107f,0.823985f,-0.072149f,0.563165f,0.823189f,-0.088478f,0.684053f,0.724047f,-0.20294f,0.64707f,0.734926f, --0.282777f,0.494303f,0.822011f,-0.168084f,0.541107f,0.823985f,-0.20294f,0.64707f,0.734926f,-0.333245f,0.577074f,0.745609f, --0.402197f,0.405178f,0.821017f,-0.282777f,0.494303f,0.822011f,-0.333245f,0.577074f,0.745609f,-0.466013f,0.469045f,0.75022f, --0.025372f,0.696348f,0.717256f,-0.020782f,0.568602f,0.822351f,0.0f,0.568694f,0.822549f,-2.0E-6f,0.698486f,0.715623f, -0.0f,0.568694f,0.822549f,-0.020782f,0.568602f,0.822351f,-0.014805f,0.369601f,0.929073f,0.0f,0.369504f,0.929229f, -0.020804f,0.568602f,0.82235f,0.0f,0.568694f,0.822549f,0.0f,0.369504f,0.929229f,0.01482f,0.369601f,0.929072f, --2.0E-6f,0.698486f,0.715623f,0.0f,0.568694f,0.822549f,0.020804f,0.568602f,0.82235f,0.025388f,0.696365f,0.717239f, --0.014805f,0.369601f,0.929073f,-0.010867f,0.22256f,0.974858f,0.0f,0.222477f,0.974938f,0.0f,0.369504f,0.929229f, -0.0f,0.369504f,0.929229f,0.0f,0.222477f,0.974938f,0.010878f,0.222561f,0.974858f,0.01482f,0.369601f,0.929072f, -0.010835f,-0.23565f,0.971778f,0.0f,-0.235564f,0.971859f,0.0f,-0.389089f,0.9212f,0.014687f,-0.38921f,0.921032f, -0.0f,-0.235564f,0.971859f,-0.010823f,-0.235649f,0.971778f,-0.014671f,-0.38921f,0.921032f,0.0f,-0.389089f,0.9212f, -0.0f,-0.389089f,0.9212f,-0.014671f,-0.38921f,0.921032f,-0.020367f,-0.591835f,0.805802f,0.0f,-0.591896f,0.806014f, -0.014687f,-0.38921f,0.921032f,0.0f,-0.389089f,0.9212f,0.0f,-0.591896f,0.806014f,0.020387f,-0.591837f,0.8058f, --0.020367f,-0.591835f,0.805802f,-0.024675f,-0.717705f,0.69591f,-2.0E-6f,-0.719788f,0.694194f,0.0f,-0.591896f,0.806014f, -0.0f,-0.591896f,0.806014f,-2.0E-6f,-0.719788f,0.694194f,0.02469f,-0.717725f,0.695889f,0.020387f,-0.591837f,0.8058f, --0.46128f,-0.48965f,0.739908f,-0.32814f,-0.599132f,0.730319f,-0.27855f,-0.517113f,0.809323f,-0.397988f,-0.425903f,0.812534f, --0.32814f,-0.599132f,0.730319f,-0.198659f,-0.669215f,0.716021f,-0.165045f,-0.564346f,0.808872f,-0.27855f,-0.517113f,0.809323f, --0.27855f,-0.517113f,0.809323f,-0.165045f,-0.564346f,0.808872f,-0.116165f,-0.380579f,0.917423f,-0.197289f,-0.366449f,0.909281f, --0.397988f,-0.425903f,0.812534f,-0.27855f,-0.517113f,0.809323f,-0.197289f,-0.366449f,0.909281f,-0.294472f,-0.315809f,0.901971f, --0.198659f,-0.669215f,0.716021f,-0.086339f,-0.705672f,0.703258f,-0.070739f,-0.586438f,0.806899f,-0.165045f,-0.564346f,0.808872f, --0.086339f,-0.705672f,0.703258f,-0.024675f,-0.717705f,0.69591f,-0.020367f,-0.591835f,0.805802f,-0.070739f,-0.586438f,0.806899f, --0.070739f,-0.586438f,0.806899f,-0.020367f,-0.591835f,0.805802f,-0.014671f,-0.38921f,0.921032f,-0.050259f,-0.387507f,0.920496f, --0.165045f,-0.564346f,0.808872f,-0.070739f,-0.586438f,0.806899f,-0.050259f,-0.387507f,0.920496f,-0.116165f,-0.380579f,0.917423f, --0.050259f,-0.387507f,0.920496f,-0.014671f,-0.38921f,0.921032f,-0.010823f,-0.235649f,0.971778f,-0.036722f,-0.235389f,0.971207f, --0.116165f,-0.380579f,0.917423f,-0.050259f,-0.387507f,0.920496f,-0.036722f,-0.235389f,0.971207f,-0.083714f,-0.234126f,0.968595f, --0.197289f,-0.366449f,0.909281f,-0.116165f,-0.380579f,0.917423f,-0.083714f,-0.234126f,0.968595f,-0.137777f,-0.231234f,0.963093f, --0.294472f,-0.315809f,0.901971f,-0.197289f,-0.366449f,0.909281f,-0.137777f,-0.231234f,0.963093f,-0.210457f,-0.226211f,0.951071f, -0.212501f,-0.226048f,0.950655f,0.297154f,-0.315494f,0.901201f,0.347306f,-0.209845f,0.913971f,0.218237f,-0.145906f,0.964927f, -0.347306f,-0.209845f,0.913971f,0.297154f,-0.315494f,0.901201f,0.401261f,-0.425239f,0.811271f,0.493682f,-0.297695f,0.817102f, -0.362206f,-0.121013f,0.924209f,0.347306f,-0.209845f,0.913971f,0.493682f,-0.297695f,0.817102f,0.542487f,-0.173678f,0.821915f, -0.218237f,-0.145906f,0.964927f,0.347306f,-0.209845f,0.913971f,0.362206f,-0.121013f,0.924209f,0.221558f,-0.086713f,0.971284f, -0.401261f,-0.425239f,0.811271f,0.464547f,-0.488911f,0.738351f,0.57643f,-0.348399f,0.739153f,0.493682f,-0.297695f,0.817102f, -0.493682f,-0.297695f,0.817102f,0.57643f,-0.348399f,0.739153f,0.648687f,-0.208869f,0.731832f,0.542487f,-0.173678f,0.821915f, -0.362206f,-0.121013f,0.924209f,0.542487f,-0.173678f,0.821915f,0.564441f,-0.072486f,0.822285f,0.368823f,-0.050932f,0.928103f, -0.542487f,-0.173678f,0.821915f,0.648687f,-0.208869f,0.731832f,0.685633f,-0.08861f,0.722534f,0.564441f,-0.072486f,0.822285f, -0.564441f,-0.072486f,0.822285f,0.685633f,-0.08861f,0.722534f,0.697362f,-0.024953f,0.716285f,0.569527f,-0.020487f,0.821717f, -0.564441f,-0.072486f,0.822285f,0.569527f,-0.020487f,0.821717f,0.370348f,-0.014597f,0.928778f,0.368823f,-0.050932f,0.928103f, -0.221558f,-0.086713f,0.971284f,0.362206f,-0.121013f,0.924209f,0.368823f,-0.050932f,0.928103f,0.222823f,-0.037022f,0.974156f, -0.222823f,-0.037022f,0.974156f,0.368823f,-0.050932f,0.928103f,0.370348f,-0.014597f,0.928778f,0.223053f,-0.010715f,0.974747f, -0.223053f,-0.010715f,0.974747f,0.370348f,-0.014597f,0.928778f,0.37024f,-1.0E-6f,0.928936f,0.222967f,-1.0E-6f,0.974826f, -0.37024f,-1.0E-6f,0.928936f,0.370348f,-0.014597f,0.928778f,0.569527f,-0.020487f,0.821717f,0.569586f,-1.0E-6f,0.821932f, -0.37035f,0.014508f,0.928779f,0.37024f,-1.0E-6f,0.928936f,0.569586f,-1.0E-6f,0.821932f,0.569522f,0.020364f,0.821724f, -0.222967f,-1.0E-6f,0.974826f,0.37024f,-1.0E-6f,0.928936f,0.37035f,0.014508f,0.928779f,0.223051f,0.010649f,0.974749f, -0.569527f,-0.020487f,0.821717f,0.697362f,-0.024953f,0.716285f,0.699353f,1.1E-5f,0.714776f,0.569586f,-1.0E-6f,0.821932f, -0.569586f,-1.0E-6f,0.821932f,0.699353f,1.1E-5f,0.714776f,0.697248f,0.024864f,0.716398f,0.569522f,0.020364f,0.821724f, --0.46128f,-0.48965f,0.739908f,-0.397988f,-0.425903f,0.812534f,-0.490028f,-0.298377f,0.819051f,-0.572885f,-0.349196f,0.741529f, --0.490028f,-0.298377f,0.819051f,-0.397988f,-0.425903f,0.812534f,-0.294472f,-0.315809f,0.901971f,-0.344264f,-0.210118f,0.915059f, --0.538747f,-0.174169f,0.824268f,-0.490028f,-0.298377f,0.819051f,-0.344264f,-0.210118f,0.915059f,-0.359131f,-0.12118f,0.925386f, --0.572885f,-0.349196f,0.741529f,-0.490028f,-0.298377f,0.819051f,-0.538747f,-0.174169f,0.824268f,-0.645088f,-0.209547f,0.734814f, --0.294472f,-0.315809f,0.901971f,-0.210457f,-0.226211f,0.951071f,-0.216181f,-0.146015f,0.965373f,-0.344264f,-0.210118f,0.915059f, --0.344264f,-0.210118f,0.915059f,-0.216181f,-0.146015f,0.965373f,-0.219508f,-0.086774f,0.971744f,-0.359131f,-0.12118f,0.925386f, --0.538747f,-0.174169f,0.824268f,-0.359131f,-0.12118f,0.925386f,-0.365721f,-0.051004f,0.929326f,-0.560687f,-0.072708f,0.82483f, --0.359131f,-0.12118f,0.925386f,-0.219508f,-0.086774f,0.971744f,-0.22077f,-0.037047f,0.974622f,-0.365721f,-0.051004f,0.929326f, --0.365721f,-0.051004f,0.929326f,-0.22077f,-0.037047f,0.974622f,-0.221f,-0.010721f,0.975215f,-0.367244f,-0.014617f,0.93001f, --0.365721f,-0.051004f,0.929326f,-0.367244f,-0.014617f,0.93001f,-0.565774f,-0.020551f,0.824304f,-0.560687f,-0.072708f,0.82483f, --0.645088f,-0.209547f,0.734814f,-0.538747f,-0.174169f,0.824268f,-0.560687f,-0.072708f,0.82483f,-0.682094f,-0.088945f,0.725836f, --0.682094f,-0.088945f,0.725836f,-0.560687f,-0.072708f,0.82483f,-0.565774f,-0.020551f,0.824304f,-0.69385f,-0.025062f,0.719683f, --0.693736f,0.024972f,0.719796f,-0.695847f,1.1E-5f,0.71819f,-0.565837f,-1.0E-6f,0.824517f,-0.565768f,0.020427f,0.824311f, --0.695847f,1.1E-5f,0.71819f,-0.69385f,-0.025062f,0.719683f,-0.565774f,-0.020551f,0.824304f,-0.565837f,-1.0E-6f,0.824517f, --0.565837f,-1.0E-6f,0.824517f,-0.565774f,-0.020551f,0.824304f,-0.367244f,-0.014617f,0.93001f,-0.36714f,-1.0E-6f,0.930166f, --0.565768f,0.020427f,0.824311f,-0.565837f,-1.0E-6f,0.824517f,-0.36714f,-1.0E-6f,0.930166f,-0.367245f,0.014528f,0.930011f, --0.367244f,-0.014617f,0.93001f,-0.221f,-0.010721f,0.975215f,-0.220914f,-1.0E-6f,0.975293f,-0.36714f,-1.0E-6f,0.930166f, --0.36714f,-1.0E-6f,0.930166f,-0.220914f,-1.0E-6f,0.975293f,-0.220997f,0.010655f,0.975216f,-0.367245f,0.014528f,0.930011f, -0.010878f,0.222561f,0.974858f,0.037001f,0.222307f,0.974274f,0.050884f,0.367932f,0.92846f,0.01482f,0.369601f,0.929072f, -0.037001f,0.222307f,0.974274f,0.084603f,0.221056f,0.971585f,0.117939f,0.361173f,0.92501f,0.050884f,0.367932f,0.92846f, -0.050884f,0.367932f,0.92846f,0.117939f,0.361173f,0.92501f,0.169134f,0.541105f,0.823771f,0.072381f,0.563194f,0.823149f, -0.020804f,0.568602f,0.82235f,0.01482f,0.369601f,0.929072f,0.050884f,0.367932f,0.92846f,0.072381f,0.563194f,0.823149f, -0.084603f,0.221056f,0.971585f,0.139597f,0.218066f,0.965898f,0.200629f,0.347092f,0.91612f,0.117939f,0.361173f,0.92501f, -0.139597f,0.218066f,0.965898f,0.213531f,0.212993f,0.953435f,0.299149f,0.298419f,0.906342f,0.200629f,0.347092f,0.91612f, -0.200629f,0.347092f,0.91612f,0.299149f,0.298419f,0.906342f,0.405489f,0.404531f,0.819716f,0.285031f,0.494036f,0.821393f, -0.117939f,0.361173f,0.92501f,0.200629f,0.347092f,0.91612f,0.285031f,0.494036f,0.821393f,0.169134f,0.541105f,0.823771f, -0.285031f,0.494036f,0.821393f,0.405489f,0.404531f,0.819716f,0.4693f,0.468325f,0.748619f,0.335556f,0.576804f,0.744781f, -0.169134f,0.541105f,0.823771f,0.285031f,0.494036f,0.821393f,0.335556f,0.576804f,0.744781f,0.204073f,0.64709f,0.734595f, -0.072381f,0.563194f,0.823149f,0.169134f,0.541105f,0.823771f,0.204073f,0.64709f,0.734595f,0.088715f,0.684119f,0.723955f, -0.020804f,0.568602f,0.82235f,0.072381f,0.563194f,0.823149f,0.088715f,0.684119f,0.723955f,0.025388f,0.696365f,0.717239f, -0.010835f,-0.23565f,0.971778f,0.014687f,-0.38921f,0.921032f,0.050418f,-0.38752f,0.920482f,0.036837f,-0.235391f,0.971203f, -0.050418f,-0.38752f,0.920482f,0.014687f,-0.38921f,0.921032f,0.020387f,-0.591837f,0.8058f,0.070967f,-0.586467f,0.806858f, -0.116885f,-0.380591f,0.917327f,0.050418f,-0.38752f,0.920482f,0.070967f,-0.586467f,0.806858f,0.166076f,-0.564345f,0.808662f, -0.036837f,-0.235391f,0.971203f,0.050418f,-0.38752f,0.920482f,0.116885f,-0.380591f,0.917327f,0.084225f,-0.234121f,0.968552f, -0.020387f,-0.591837f,0.8058f,0.02469f,-0.717725f,0.695889f,0.086571f,-0.705739f,0.703163f,0.070967f,-0.586467f,0.806858f, -0.070967f,-0.586467f,0.806858f,0.086571f,-0.705739f,0.703163f,0.199773f,-0.669232f,0.715695f,0.166076f,-0.564345f,0.808662f, -0.116885f,-0.380591f,0.917327f,0.166076f,-0.564345f,0.808662f,0.280776f,-0.516844f,0.808725f,0.198928f,-0.366325f,0.908974f, -0.166076f,-0.564345f,0.808662f,0.199773f,-0.669232f,0.715695f,0.33043f,-0.598851f,0.729516f,0.280776f,-0.516844f,0.808725f, -0.280776f,-0.516844f,0.808725f,0.33043f,-0.598851f,0.729516f,0.464547f,-0.488911f,0.738351f,0.401261f,-0.425239f,0.811271f, -0.280776f,-0.516844f,0.808725f,0.401261f,-0.425239f,0.811271f,0.297154f,-0.315494f,0.901201f,0.198928f,-0.366325f,0.908974f, -0.084225f,-0.234121f,0.968552f,0.116885f,-0.380591f,0.917327f,0.198928f,-0.366325f,0.908974f,0.138923f,-0.231173f,0.962943f, -0.138923f,-0.231173f,0.962943f,0.198928f,-0.366325f,0.908974f,0.297154f,-0.315494f,0.901201f,0.212501f,-0.226048f,0.950655f, -0.007169f,-0.00707f,0.999949f,0.007179f,-0.025559f,0.999648f,0.025473f,-0.02556f,0.999349f,0.025479f,-0.007087f,0.99965f, -0.007179f,-0.025559f,0.999648f,0.007472f,-0.063716f,0.99794f,0.02618f,-0.063744f,0.997623f,0.025473f,-0.02556f,0.999349f, -0.025473f,-0.02556f,0.999349f,0.02618f,-0.063744f,0.997623f,0.062764f,-0.064559f,0.995938f,0.061979f,-0.026292f,0.997731f, -0.025479f,-0.007087f,0.99965f,0.025473f,-0.02556f,0.999349f,0.061979f,-0.026292f,0.997731f,0.061944f,-0.007387f,0.998052f, -0.007472f,-0.063716f,0.99794f,0.008329f,-0.119124f,0.992845f,0.028568f,-0.119188f,0.992461f,0.02618f,-0.063744f,0.997623f, -0.008329f,-0.119124f,0.992845f,0.010835f,-0.23565f,0.971778f,0.036837f,-0.235391f,0.971203f,0.028568f,-0.119188f,0.992461f, -0.028568f,-0.119188f,0.992461f,0.036837f,-0.235391f,0.971203f,0.084225f,-0.234121f,0.968552f,0.066426f,-0.119489f,0.990611f, -0.02618f,-0.063744f,0.997623f,0.028568f,-0.119188f,0.992461f,0.066426f,-0.119489f,0.990611f,0.062764f,-0.064559f,0.995938f, -0.062764f,-0.064559f,0.995938f,0.066426f,-0.119489f,0.990611f,0.114563f,-0.120018f,0.98614f,0.113981f,-0.068259f,0.991135f, -0.066426f,-0.119489f,0.990611f,0.084225f,-0.234121f,0.968552f,0.138923f,-0.231173f,0.962943f,0.114563f,-0.120018f,0.98614f, -0.114563f,-0.120018f,0.98614f,0.138923f,-0.231173f,0.962943f,0.212501f,-0.226048f,0.950655f,0.218237f,-0.145906f,0.964927f, -0.113981f,-0.068259f,0.991135f,0.114563f,-0.120018f,0.98614f,0.218237f,-0.145906f,0.964927f,0.221558f,-0.086713f,0.971284f, -0.061944f,-0.007387f,0.998052f,0.061979f,-0.026292f,0.997731f,0.113708f,-0.028673f,0.9931f,0.113635f,-0.008231f,0.993489f, -0.061979f,-0.026292f,0.997731f,0.062764f,-0.064559f,0.995938f,0.113981f,-0.068259f,0.991135f,0.113708f,-0.028673f,0.9931f, -0.113708f,-0.028673f,0.9931f,0.113981f,-0.068259f,0.991135f,0.221558f,-0.086713f,0.971284f,0.222823f,-0.037022f,0.974156f, -0.113635f,-0.008231f,0.993489f,0.113708f,-0.028673f,0.9931f,0.222823f,-0.037022f,0.974156f,0.223053f,-0.010715f,0.974747f, -0.00717f,0.007027f,0.99995f,0.007189f,0.0f,0.999974f,0.025542f,0.0f,0.999674f,0.025482f,0.007044f,0.999651f, -0.007189f,0.0f,0.999974f,0.007169f,-0.00707f,0.999949f,0.025479f,-0.007087f,0.99965f,0.025542f,0.0f,0.999674f, -0.025542f,0.0f,0.999674f,0.025479f,-0.007087f,0.99965f,0.061944f,-0.007387f,0.998052f,0.061996f,0.0f,0.998076f, -0.025482f,0.007044f,0.999651f,0.025542f,0.0f,0.999674f,0.061996f,0.0f,0.998076f,0.061948f,0.007344f,0.998052f, -0.061944f,-0.007387f,0.998052f,0.113635f,-0.008231f,0.993489f,0.11363f,0.0f,0.993523f,0.061996f,0.0f,0.998076f, -0.113635f,-0.008231f,0.993489f,0.223053f,-0.010715f,0.974747f,0.222967f,-1.0E-6f,0.974826f,0.11363f,0.0f,0.993523f, -0.11363f,0.0f,0.993523f,0.222967f,-1.0E-6f,0.974826f,0.223051f,0.010649f,0.974749f,0.113637f,0.008184f,0.993489f, -0.061996f,0.0f,0.998076f,0.11363f,0.0f,0.993523f,0.113637f,0.008184f,0.993489f,0.061948f,0.007344f,0.998052f, --0.693736f,0.024972f,0.719796f,-0.565768f,0.020427f,0.824311f,-0.560511f,0.071322f,0.82507f,-0.681667f,0.087549f,0.726406f, --0.560511f,0.071322f,0.82507f,-0.565768f,0.020427f,0.824311f,-0.367245f,0.014528f,0.930011f,-0.365644f,0.050051f,0.929408f, --0.53875f,0.167715f,0.825603f,-0.560511f,0.071322f,0.82507f,-0.365644f,0.050051f,0.929408f,-0.359059f,0.116722f,0.925987f, --0.681667f,0.087549f,0.726406f,-0.560511f,0.071322f,0.82507f,-0.53875f,0.167715f,0.825603f,-0.644943f,0.202621f,0.736881f, --0.367245f,0.014528f,0.930011f,-0.220997f,0.010655f,0.975216f,-0.220758f,0.036362f,0.974651f,-0.365644f,0.050051f,0.929408f, --0.365644f,0.050051f,0.929408f,-0.220758f,0.036362f,0.974651f,-0.219543f,0.083629f,0.972012f,-0.359059f,0.116722f,0.925987f, --0.53875f,0.167715f,0.825603f,-0.359059f,0.116722f,0.925987f,-0.34505f,0.199733f,0.917086f,-0.491757f,0.284219f,0.82304f, --0.359059f,0.116722f,0.925987f,-0.219543f,0.083629f,0.972012f,-0.216564f,0.138788f,0.966353f,-0.34505f,0.199733f,0.917086f, --0.34505f,0.199733f,0.917086f,-0.216564f,0.138788f,0.966353f,-0.211482f,0.213152f,0.953856f,-0.296456f,0.298724f,0.907126f, --0.34505f,0.199733f,0.917086f,-0.296456f,0.298724f,0.907126f,-0.402197f,0.405178f,0.821017f,-0.491757f,0.284219f,0.82304f, --0.644943f,0.202621f,0.736881f,-0.53875f,0.167715f,0.825603f,-0.491757f,0.284219f,0.82304f,-0.574618f,0.33479f,0.746813f, --0.574618f,0.33479f,0.746813f,-0.491757f,0.284219f,0.82304f,-0.402197f,0.405178f,0.821017f,-0.466013f,0.469045f,0.75022f, -0.223051f,0.010649f,0.974749f,0.37035f,0.014508f,0.928779f,0.368745f,0.04998f,0.928186f,0.222811f,0.036337f,0.974184f, -0.368745f,0.04998f,0.928186f,0.37035f,0.014508f,0.928779f,0.569522f,0.020364f,0.821724f,0.564266f,0.071105f,0.822525f, -0.362133f,0.116561f,0.92481f,0.368745f,0.04998f,0.928186f,0.564266f,0.071105f,0.822525f,0.54249f,0.167243f,0.823246f, -0.222811f,0.036337f,0.974184f,0.368745f,0.04998f,0.928186f,0.362133f,0.116561f,0.92481f,0.221593f,0.083571f,0.971552f, -0.569522f,0.020364f,0.821724f,0.697248f,0.024864f,0.716398f,0.685209f,0.08722f,0.723105f,0.564266f,0.071105f,0.822525f, -0.564266f,0.071105f,0.822525f,0.685209f,0.08722f,0.723105f,0.648546f,0.20196f,0.733894f,0.54249f,0.167243f,0.823246f, -0.362133f,0.116561f,0.92481f,0.54249f,0.167243f,0.823246f,0.495412f,0.283564f,0.821071f,0.348093f,0.199473f,0.915992f, -0.54249f,0.167243f,0.823246f,0.648546f,0.20196f,0.733894f,0.578173f,0.334012f,0.744414f,0.495412f,0.283564f,0.821071f, -0.495412f,0.283564f,0.821071f,0.578173f,0.334012f,0.744414f,0.4693f,0.468325f,0.748619f,0.405489f,0.404531f,0.819716f, -0.495412f,0.283564f,0.821071f,0.405489f,0.404531f,0.819716f,0.299149f,0.298419f,0.906342f,0.348093f,0.199473f,0.915992f, -0.221593f,0.083571f,0.971552f,0.362133f,0.116561f,0.92481f,0.348093f,0.199473f,0.915992f,0.218621f,0.138683f,0.965905f, -0.218621f,0.138683f,0.965905f,0.348093f,0.199473f,0.915992f,0.299149f,0.298419f,0.906342f,0.213531f,0.212993f,0.953435f, -0.010878f,0.222561f,0.974858f,0.008351f,0.113056f,0.993554f,0.028645f,0.113157f,0.993164f,0.037001f,0.222307f,0.974274f, -0.008351f,0.113056f,0.993554f,0.007491f,0.061287f,0.998092f,0.026239f,0.061352f,0.997771f,0.028645f,0.113157f,0.993164f, -0.028645f,0.113157f,0.993164f,0.026239f,0.061352f,0.997771f,0.062873f,0.062197f,0.996082f,0.066588f,0.113508f,0.991303f, -0.037001f,0.222307f,0.974274f,0.028645f,0.113157f,0.993164f,0.066588f,0.113508f,0.991303f,0.084603f,0.221056f,0.971585f, -0.007491f,0.061287f,0.998092f,0.007187f,0.025058f,0.99966f,0.025494f,0.025072f,0.999361f,0.026239f,0.061352f,0.997771f, -0.007187f,0.025058f,0.99966f,0.00717f,0.007027f,0.99995f,0.025482f,0.007044f,0.999651f,0.025494f,0.025072f,0.999361f, -0.025494f,0.025072f,0.999361f,0.025482f,0.007044f,0.999651f,0.061948f,0.007344f,0.998052f,0.062015f,0.025807f,0.997742f, -0.026239f,0.061352f,0.997771f,0.025494f,0.025072f,0.999361f,0.062015f,0.025807f,0.997742f,0.062873f,0.062197f,0.996082f, -0.062873f,0.062197f,0.996082f,0.062015f,0.025807f,0.997742f,0.113738f,0.028159f,0.993112f,0.114097f,0.065833f,0.991286f, -0.062015f,0.025807f,0.997742f,0.061948f,0.007344f,0.998052f,0.113637f,0.008184f,0.993489f,0.113738f,0.028159f,0.993112f, -0.113738f,0.028159f,0.993112f,0.113637f,0.008184f,0.993489f,0.223051f,0.010649f,0.974749f,0.222811f,0.036337f,0.974184f, -0.114097f,0.065833f,0.991286f,0.113738f,0.028159f,0.993112f,0.222811f,0.036337f,0.974184f,0.221593f,0.083571f,0.971552f, -0.084603f,0.221056f,0.971585f,0.066588f,0.113508f,0.991303f,0.114794f,0.114134f,0.986811f,0.139597f,0.218066f,0.965898f, -0.066588f,0.113508f,0.991303f,0.062873f,0.062197f,0.996082f,0.114097f,0.065833f,0.991286f,0.114794f,0.114134f,0.986811f, -0.114794f,0.114134f,0.986811f,0.114097f,0.065833f,0.991286f,0.221593f,0.083571f,0.971552f,0.218621f,0.138683f,0.965905f, -0.139597f,0.218066f,0.965898f,0.114794f,0.114134f,0.986811f,0.218621f,0.138683f,0.965905f,0.213531f,0.212993f,0.953435f, -0.007491f,0.061287f,0.998092f,0.008351f,0.113056f,0.993554f,0.0f,0.113048f,0.99359f,0.0f,0.061335f,0.998117f, -0.008351f,0.113056f,0.993554f,0.010878f,0.222561f,0.974858f,0.0f,0.222477f,0.974938f,0.0f,0.113048f,0.99359f, -0.0f,0.113048f,0.99359f,0.0f,0.222477f,0.974938f,-0.010867f,0.22256f,0.974858f,-0.008343f,0.113057f,0.993554f, -0.0f,0.061335f,0.998117f,0.0f,0.113048f,0.99359f,-0.008343f,0.113057f,0.993554f,-0.007484f,0.061287f,0.998092f, -0.007491f,0.061287f,0.998092f,0.0f,0.061335f,0.998117f,0.0f,0.025116f,0.999685f,0.007187f,0.025058f,0.99966f, -0.0f,0.061335f,0.998117f,-0.007484f,0.061287f,0.998092f,-0.00718f,0.025059f,0.99966f,0.0f,0.025116f,0.999685f, -0.0f,0.025116f,0.999685f,-0.00718f,0.025059f,0.99966f,-0.007163f,0.007027f,0.99995f,0.0f,0.007045f,0.999975f, -0.007187f,0.025058f,0.99966f,0.0f,0.025116f,0.999685f,0.0f,0.007045f,0.999975f,0.00717f,0.007027f,0.99995f, --0.220997f,0.010655f,0.975216f,-0.112675f,0.008187f,0.993598f,-0.112781f,0.02817f,0.993221f,-0.220758f,0.036362f,0.974651f, --0.112675f,0.008187f,0.993598f,-0.061553f,0.007347f,0.998077f,-0.061625f,0.025816f,0.997765f,-0.112781f,0.02817f,0.993221f, --0.112781f,0.02817f,0.993221f,-0.061625f,0.025816f,0.997765f,-0.062487f,0.062214f,0.996105f,-0.113147f,0.065858f,0.991393f, --0.220758f,0.036362f,0.974651f,-0.112781f,0.02817f,0.993221f,-0.113147f,0.065858f,0.991393f,-0.219543f,0.083629f,0.972012f, --0.061553f,0.007347f,0.998077f,-0.025398f,0.007046f,0.999653f,-0.025412f,0.025076f,0.999363f,-0.061625f,0.025816f,0.997765f, --0.025398f,0.007046f,0.999653f,-0.007163f,0.007027f,0.99995f,-0.00718f,0.025059f,0.99966f,-0.025412f,0.025076f,0.999363f, --0.025412f,0.025076f,0.999363f,-0.00718f,0.025059f,0.99966f,-0.007484f,0.061287f,0.998092f,-0.026157f,0.061358f,0.997773f, --0.061625f,0.025816f,0.997765f,-0.025412f,0.025076f,0.999363f,-0.026157f,0.061358f,0.997773f,-0.062487f,0.062214f,0.996105f, --0.062487f,0.062214f,0.996105f,-0.026157f,0.061358f,0.997773f,-0.028558f,0.113162f,0.993166f,-0.066192f,0.113526f,0.991328f, --0.026157f,0.061358f,0.997773f,-0.007484f,0.061287f,0.998092f,-0.008343f,0.113057f,0.993554f,-0.028558f,0.113162f,0.993166f, --0.028558f,0.113162f,0.993166f,-0.008343f,0.113057f,0.993554f,-0.010867f,0.22256f,0.974858f,-0.036885f,0.222305f,0.974279f, --0.066192f,0.113526f,0.991328f,-0.028558f,0.113162f,0.993166f,-0.036885f,0.222305f,0.974279f,-0.084089f,0.221062f,0.971628f, --0.219543f,0.083629f,0.972012f,-0.113147f,0.065858f,0.991393f,-0.113857f,0.11417f,0.986915f,-0.216564f,0.138788f,0.966353f, --0.113147f,0.065858f,0.991393f,-0.062487f,0.062214f,0.996105f,-0.066192f,0.113526f,0.991328f,-0.113857f,0.11417f,0.986915f, --0.113857f,0.11417f,0.986915f,-0.066192f,0.113526f,0.991328f,-0.084089f,0.221062f,0.971628f,-0.138447f,0.218126f,0.966051f, --0.216564f,0.138788f,0.966353f,-0.113857f,0.11417f,0.986915f,-0.138447f,0.218126f,0.966051f,-0.211482f,0.213152f,0.953856f, + -0.210457f, -0.226211f, 0.951071f, -0.137777f, -0.231234f, 0.963093f, -0.113627f, -0.120055f, 0.986243f, -0.216181f, -0.146015f, 0.965373f, + -0.137777f, -0.231234f, 0.963093f, -0.083714f, -0.234126f, 0.968595f, -0.06603f, -0.119508f, 0.990635f, -0.113627f, -0.120055f, 0.986243f, + -0.113627f, -0.120055f, 0.986243f, -0.06603f, -0.119508f, 0.990635f, -0.062379f, -0.064577f, 0.995961f, -0.113032f, -0.068284f, 0.991242f, + -0.216181f, -0.146015f, 0.965373f, -0.113627f, -0.120055f, 0.986243f, -0.113032f, -0.068284f, 0.991242f, -0.219508f, -0.086774f, 0.971744f, + -0.083714f, -0.234126f, 0.968595f, -0.036722f, -0.235389f, 0.971207f, -0.028482f, -0.119193f, 0.992463f, -0.06603f, -0.119508f, 0.990635f, + -0.036722f, -0.235389f, 0.971207f, -0.010823f, -0.235649f, 0.971778f, -0.008321f, -0.119124f, 0.992845f, -0.028482f, -0.119193f, 0.992463f, + -0.028482f, -0.119193f, 0.992463f, -0.008321f, -0.119124f, 0.992845f, -0.007465f, -0.063717f, 0.99794f, -0.026099f, -0.06375f, 0.997625f, + -0.06603f, -0.119508f, 0.990635f, -0.028482f, -0.119193f, 0.992463f, -0.026099f, -0.06375f, 0.997625f, -0.062379f, -0.064577f, 0.995961f, + -0.062379f, -0.064577f, 0.995961f, -0.026099f, -0.06375f, 0.997625f, -0.025391f, -0.025563f, 0.999351f, -0.061589f, -0.026301f, 0.997755f, + -0.026099f, -0.06375f, 0.997625f, -0.007465f, -0.063717f, 0.99794f, -0.007172f, -0.02556f, 0.999648f, -0.025391f, -0.025563f, 0.999351f, + -0.025391f, -0.025563f, 0.999351f, -0.007172f, -0.02556f, 0.999648f, -0.007161f, -0.00707f, 0.999949f, -0.025395f, -0.007088f, 0.999652f, + -0.061589f, -0.026301f, 0.997755f, -0.025391f, -0.025563f, 0.999351f, -0.025395f, -0.007088f, 0.999652f, -0.061548f, -0.00739f, 0.998077f, + -0.219508f, -0.086774f, 0.971744f, -0.113032f, -0.068284f, 0.991242f, -0.112752f, -0.028685f, 0.993209f, -0.22077f, -0.037047f, 0.974622f, + -0.113032f, -0.068284f, 0.991242f, -0.062379f, -0.064577f, 0.995961f, -0.061589f, -0.026301f, 0.997755f, -0.112752f, -0.028685f, 0.993209f, + -0.112752f, -0.028685f, 0.993209f, -0.061589f, -0.026301f, 0.997755f, -0.061548f, -0.00739f, 0.998077f, -0.112673f, -0.008234f, 0.993598f, + -0.22077f, -0.037047f, 0.974622f, -0.112752f, -0.028685f, 0.993209f, -0.112673f, -0.008234f, 0.993598f, -0.221f, -0.010721f, 0.975215f, + -0.007161f, -0.00707f, 0.999949f, -0.007172f, -0.02556f, 0.999648f, 0.0f, -0.025624f, 0.999672f, 0.0f, -0.007089f, 0.999975f, + -0.007172f, -0.02556f, 0.999648f, -0.007465f, -0.063717f, 0.99794f, 0.0f, -0.06378f, 0.997964f, 0.0f, -0.025624f, 0.999672f, + 0.0f, -0.025624f, 0.999672f, 0.0f, -0.06378f, 0.997964f, 0.007472f, -0.063716f, 0.99794f, 0.007179f, -0.025559f, 0.999648f, + 0.0f, -0.007089f, 0.999975f, 0.0f, -0.025624f, 0.999672f, 0.007179f, -0.025559f, 0.999648f, 0.007169f, -0.00707f, 0.999949f, + -0.007465f, -0.063717f, 0.99794f, -0.008321f, -0.119124f, 0.992845f, 0.0f, -0.119133f, 0.992878f, 0.0f, -0.06378f, 0.997964f, + -0.008321f, -0.119124f, 0.992845f, -0.010823f, -0.235649f, 0.971778f, 0.0f, -0.235564f, 0.971859f, 0.0f, -0.119133f, 0.992878f, + 0.0f, -0.119133f, 0.992878f, 0.0f, -0.235564f, 0.971859f, 0.010835f, -0.23565f, 0.971778f, 0.008329f, -0.119124f, 0.992845f, + 0.0f, -0.06378f, 0.997964f, 0.0f, -0.119133f, 0.992878f, 0.008329f, -0.119124f, 0.992845f, 0.007472f, -0.063716f, 0.99794f, + -0.007161f, -0.00707f, 0.999949f, 0.0f, -0.007089f, 0.999975f, 0.0f, 0.0f, 1.0f, -0.007181f, 0.0f, 0.999974f, + 0.0f, -0.007089f, 0.999975f, 0.007169f, -0.00707f, 0.999949f, 0.007189f, 0.0f, 0.999974f, 0.0f, 0.0f, 1.0f, + 0.0f, 0.0f, 1.0f, 0.007189f, 0.0f, 0.999974f, 0.00717f, 0.007027f, 0.99995f, 0.0f, 0.007045f, 0.999975f, + -0.007181f, 0.0f, 0.999974f, 0.0f, 0.0f, 1.0f, 0.0f, 0.007045f, 0.999975f, -0.007163f, 0.007027f, 0.99995f, + -0.061553f, 0.007347f, 0.998077f, -0.112675f, 0.008187f, 0.993598f, -0.112665f, 0.0f, 0.993633f, -0.061598f, 0.0f, 0.998101f, + -0.112675f, 0.008187f, 0.993598f, -0.220997f, 0.010655f, 0.975216f, -0.220914f, -1.0E-6f, 0.975293f, -0.112665f, 0.0f, 0.993633f, + -0.112665f, 0.0f, 0.993633f, -0.220914f, -1.0E-6f, 0.975293f, -0.221f, -0.010721f, 0.975215f, -0.112673f, -0.008234f, 0.993598f, + -0.061598f, 0.0f, 0.998101f, -0.112665f, 0.0f, 0.993633f, -0.112673f, -0.008234f, 0.993598f, -0.061548f, -0.00739f, 0.998077f, + -0.061553f, 0.007347f, 0.998077f, -0.061598f, 0.0f, 0.998101f, -0.025456f, 0.0f, 0.999676f, -0.025398f, 0.007046f, 0.999653f, + -0.061598f, 0.0f, 0.998101f, -0.061548f, -0.00739f, 0.998077f, -0.025395f, -0.007088f, 0.999652f, -0.025456f, 0.0f, 0.999676f, + -0.025456f, 0.0f, 0.999676f, -0.025395f, -0.007088f, 0.999652f, -0.007161f, -0.00707f, 0.999949f, -0.007181f, 0.0f, 0.999974f, + -0.025398f, 0.007046f, 0.999653f, -0.025456f, 0.0f, 0.999676f, -0.007181f, 0.0f, 0.999974f, -0.007163f, 0.007027f, 0.99995f, + -0.211482f, 0.213152f, 0.953856f, -0.138447f, 0.218126f, 0.966051f, -0.198978f, 0.347214f, 0.916433f, -0.296456f, 0.298724f, 0.907126f, + -0.138447f, 0.218126f, 0.966051f, -0.084089f, 0.221062f, 0.971628f, -0.117212f, 0.361162f, 0.925107f, -0.198978f, 0.347214f, 0.916433f, + -0.198978f, 0.347214f, 0.916433f, -0.117212f, 0.361162f, 0.925107f, -0.168084f, 0.541107f, 0.823985f, -0.282777f, 0.494303f, 0.822011f, + -0.296456f, 0.298724f, 0.907126f, -0.198978f, 0.347214f, 0.916433f, -0.282777f, 0.494303f, 0.822011f, -0.402197f, 0.405178f, 0.821017f, + -0.084089f, 0.221062f, 0.971628f, -0.036885f, 0.222305f, 0.974279f, -0.050723f, 0.367918f, 0.928474f, -0.117212f, 0.361162f, 0.925107f, + -0.036885f, 0.222305f, 0.974279f, -0.010867f, 0.22256f, 0.974858f, -0.014805f, 0.369601f, 0.929073f, -0.050723f, 0.367918f, 0.928474f, + -0.050723f, 0.367918f, 0.928474f, -0.014805f, 0.369601f, 0.929073f, -0.020782f, 0.568602f, 0.822351f, -0.072149f, 0.563165f, 0.823189f, + -0.117212f, 0.361162f, 0.925107f, -0.050723f, 0.367918f, 0.928474f, -0.072149f, 0.563165f, 0.823189f, -0.168084f, 0.541107f, 0.823985f, + -0.072149f, 0.563165f, 0.823189f, -0.020782f, 0.568602f, 0.822351f, -0.025372f, 0.696348f, 0.717256f, -0.088478f, 0.684053f, 0.724047f, + -0.168084f, 0.541107f, 0.823985f, -0.072149f, 0.563165f, 0.823189f, -0.088478f, 0.684053f, 0.724047f, -0.20294f, 0.64707f, 0.734926f, + -0.282777f, 0.494303f, 0.822011f, -0.168084f, 0.541107f, 0.823985f, -0.20294f, 0.64707f, 0.734926f, -0.333245f, 0.577074f, 0.745609f, + -0.402197f, 0.405178f, 0.821017f, -0.282777f, 0.494303f, 0.822011f, -0.333245f, 0.577074f, 0.745609f, -0.466013f, 0.469045f, 0.75022f, + -0.025372f, 0.696348f, 0.717256f, -0.020782f, 0.568602f, 0.822351f, 0.0f, 0.568694f, 0.822549f, -2.0E-6f, 0.698486f, 0.715623f, + 0.0f, 0.568694f, 0.822549f, -0.020782f, 0.568602f, 0.822351f, -0.014805f, 0.369601f, 0.929073f, 0.0f, 0.369504f, 0.929229f, + 0.020804f, 0.568602f, 0.82235f, 0.0f, 0.568694f, 0.822549f, 0.0f, 0.369504f, 0.929229f, 0.01482f, 0.369601f, 0.929072f, + -2.0E-6f, 0.698486f, 0.715623f, 0.0f, 0.568694f, 0.822549f, 0.020804f, 0.568602f, 0.82235f, 0.025388f, 0.696365f, 0.717239f, + -0.014805f, 0.369601f, 0.929073f, -0.010867f, 0.22256f, 0.974858f, 0.0f, 0.222477f, 0.974938f, 0.0f, 0.369504f, 0.929229f, + 0.0f, 0.369504f, 0.929229f, 0.0f, 0.222477f, 0.974938f, 0.010878f, 0.222561f, 0.974858f, 0.01482f, 0.369601f, 0.929072f, + 0.010835f, -0.23565f, 0.971778f, 0.0f, -0.235564f, 0.971859f, 0.0f, -0.389089f, 0.9212f, 0.014687f, -0.38921f, 0.921032f, + 0.0f, -0.235564f, 0.971859f, -0.010823f, -0.235649f, 0.971778f, -0.014671f, -0.38921f, 0.921032f, 0.0f, -0.389089f, 0.9212f, + 0.0f, -0.389089f, 0.9212f, -0.014671f, -0.38921f, 0.921032f, -0.020367f, -0.591835f, 0.805802f, 0.0f, -0.591896f, 0.806014f, + 0.014687f, -0.38921f, 0.921032f, 0.0f, -0.389089f, 0.9212f, 0.0f, -0.591896f, 0.806014f, 0.020387f, -0.591837f, 0.8058f, + -0.020367f, -0.591835f, 0.805802f, -0.024675f, -0.717705f, 0.69591f, -2.0E-6f, -0.719788f, 0.694194f, 0.0f, -0.591896f, 0.806014f, + 0.0f, -0.591896f, 0.806014f, -2.0E-6f, -0.719788f, 0.694194f, 0.02469f, -0.717725f, 0.695889f, 0.020387f, -0.591837f, 0.8058f, + -0.46128f, -0.48965f, 0.739908f, -0.32814f, -0.599132f, 0.730319f, -0.27855f, -0.517113f, 0.809323f, -0.397988f, -0.425903f, 0.812534f, + -0.32814f, -0.599132f, 0.730319f, -0.198659f, -0.669215f, 0.716021f, -0.165045f, -0.564346f, 0.808872f, -0.27855f, -0.517113f, 0.809323f, + -0.27855f, -0.517113f, 0.809323f, -0.165045f, -0.564346f, 0.808872f, -0.116165f, -0.380579f, 0.917423f, -0.197289f, -0.366449f, 0.909281f, + -0.397988f, -0.425903f, 0.812534f, -0.27855f, -0.517113f, 0.809323f, -0.197289f, -0.366449f, 0.909281f, -0.294472f, -0.315809f, 0.901971f, + -0.198659f, -0.669215f, 0.716021f, -0.086339f, -0.705672f, 0.703258f, -0.070739f, -0.586438f, 0.806899f, -0.165045f, -0.564346f, 0.808872f, + -0.086339f, -0.705672f, 0.703258f, -0.024675f, -0.717705f, 0.69591f, -0.020367f, -0.591835f, 0.805802f, -0.070739f, -0.586438f, 0.806899f, + -0.070739f, -0.586438f, 0.806899f, -0.020367f, -0.591835f, 0.805802f, -0.014671f, -0.38921f, 0.921032f, -0.050259f, -0.387507f, 0.920496f, + -0.165045f, -0.564346f, 0.808872f, -0.070739f, -0.586438f, 0.806899f, -0.050259f, -0.387507f, 0.920496f, -0.116165f, -0.380579f, 0.917423f, + -0.050259f, -0.387507f, 0.920496f, -0.014671f, -0.38921f, 0.921032f, -0.010823f, -0.235649f, 0.971778f, -0.036722f, -0.235389f, 0.971207f, + -0.116165f, -0.380579f, 0.917423f, -0.050259f, -0.387507f, 0.920496f, -0.036722f, -0.235389f, 0.971207f, -0.083714f, -0.234126f, 0.968595f, + -0.197289f, -0.366449f, 0.909281f, -0.116165f, -0.380579f, 0.917423f, -0.083714f, -0.234126f, 0.968595f, -0.137777f, -0.231234f, 0.963093f, + -0.294472f, -0.315809f, 0.901971f, -0.197289f, -0.366449f, 0.909281f, -0.137777f, -0.231234f, 0.963093f, -0.210457f, -0.226211f, 0.951071f, + 0.212501f, -0.226048f, 0.950655f, 0.297154f, -0.315494f, 0.901201f, 0.347306f, -0.209845f, 0.913971f, 0.218237f, -0.145906f, 0.964927f, + 0.347306f, -0.209845f, 0.913971f, 0.297154f, -0.315494f, 0.901201f, 0.401261f, -0.425239f, 0.811271f, 0.493682f, -0.297695f, 0.817102f, + 0.362206f, -0.121013f, 0.924209f, 0.347306f, -0.209845f, 0.913971f, 0.493682f, -0.297695f, 0.817102f, 0.542487f, -0.173678f, 0.821915f, + 0.218237f, -0.145906f, 0.964927f, 0.347306f, -0.209845f, 0.913971f, 0.362206f, -0.121013f, 0.924209f, 0.221558f, -0.086713f, 0.971284f, + 0.401261f, -0.425239f, 0.811271f, 0.464547f, -0.488911f, 0.738351f, 0.57643f, -0.348399f, 0.739153f, 0.493682f, -0.297695f, 0.817102f, + 0.493682f, -0.297695f, 0.817102f, 0.57643f, -0.348399f, 0.739153f, 0.648687f, -0.208869f, 0.731832f, 0.542487f, -0.173678f, 0.821915f, + 0.362206f, -0.121013f, 0.924209f, 0.542487f, -0.173678f, 0.821915f, 0.564441f, -0.072486f, 0.822285f, 0.368823f, -0.050932f, 0.928103f, + 0.542487f, -0.173678f, 0.821915f, 0.648687f, -0.208869f, 0.731832f, 0.685633f, -0.08861f, 0.722534f, 0.564441f, -0.072486f, 0.822285f, + 0.564441f, -0.072486f, 0.822285f, 0.685633f, -0.08861f, 0.722534f, 0.697362f, -0.024953f, 0.716285f, 0.569527f, -0.020487f, 0.821717f, + 0.564441f, -0.072486f, 0.822285f, 0.569527f, -0.020487f, 0.821717f, 0.370348f, -0.014597f, 0.928778f, 0.368823f, -0.050932f, 0.928103f, + 0.221558f, -0.086713f, 0.971284f, 0.362206f, -0.121013f, 0.924209f, 0.368823f, -0.050932f, 0.928103f, 0.222823f, -0.037022f, 0.974156f, + 0.222823f, -0.037022f, 0.974156f, 0.368823f, -0.050932f, 0.928103f, 0.370348f, -0.014597f, 0.928778f, 0.223053f, -0.010715f, 0.974747f, + 0.223053f, -0.010715f, 0.974747f, 0.370348f, -0.014597f, 0.928778f, 0.37024f, -1.0E-6f, 0.928936f, 0.222967f, -1.0E-6f, 0.974826f, + 0.37024f, -1.0E-6f, 0.928936f, 0.370348f, -0.014597f, 0.928778f, 0.569527f, -0.020487f, 0.821717f, 0.569586f, -1.0E-6f, 0.821932f, + 0.37035f, 0.014508f, 0.928779f, 0.37024f, -1.0E-6f, 0.928936f, 0.569586f, -1.0E-6f, 0.821932f, 0.569522f, 0.020364f, 0.821724f, + 0.222967f, -1.0E-6f, 0.974826f, 0.37024f, -1.0E-6f, 0.928936f, 0.37035f, 0.014508f, 0.928779f, 0.223051f, 0.010649f, 0.974749f, + 0.569527f, -0.020487f, 0.821717f, 0.697362f, -0.024953f, 0.716285f, 0.699353f, 1.1E-5f, 0.714776f, 0.569586f, -1.0E-6f, 0.821932f, + 0.569586f, -1.0E-6f, 0.821932f, 0.699353f, 1.1E-5f, 0.714776f, 0.697248f, 0.024864f, 0.716398f, 0.569522f, 0.020364f, 0.821724f, + -0.46128f, -0.48965f, 0.739908f, -0.397988f, -0.425903f, 0.812534f, -0.490028f, -0.298377f, 0.819051f, -0.572885f, -0.349196f, 0.741529f, + -0.490028f, -0.298377f, 0.819051f, -0.397988f, -0.425903f, 0.812534f, -0.294472f, -0.315809f, 0.901971f, -0.344264f, -0.210118f, 0.915059f, + -0.538747f, -0.174169f, 0.824268f, -0.490028f, -0.298377f, 0.819051f, -0.344264f, -0.210118f, 0.915059f, -0.359131f, -0.12118f, 0.925386f, + -0.572885f, -0.349196f, 0.741529f, -0.490028f, -0.298377f, 0.819051f, -0.538747f, -0.174169f, 0.824268f, -0.645088f, -0.209547f, 0.734814f, + -0.294472f, -0.315809f, 0.901971f, -0.210457f, -0.226211f, 0.951071f, -0.216181f, -0.146015f, 0.965373f, -0.344264f, -0.210118f, 0.915059f, + -0.344264f, -0.210118f, 0.915059f, -0.216181f, -0.146015f, 0.965373f, -0.219508f, -0.086774f, 0.971744f, -0.359131f, -0.12118f, 0.925386f, + -0.538747f, -0.174169f, 0.824268f, -0.359131f, -0.12118f, 0.925386f, -0.365721f, -0.051004f, 0.929326f, -0.560687f, -0.072708f, 0.82483f, + -0.359131f, -0.12118f, 0.925386f, -0.219508f, -0.086774f, 0.971744f, -0.22077f, -0.037047f, 0.974622f, -0.365721f, -0.051004f, 0.929326f, + -0.365721f, -0.051004f, 0.929326f, -0.22077f, -0.037047f, 0.974622f, -0.221f, -0.010721f, 0.975215f, -0.367244f, -0.014617f, 0.93001f, + -0.365721f, -0.051004f, 0.929326f, -0.367244f, -0.014617f, 0.93001f, -0.565774f, -0.020551f, 0.824304f, -0.560687f, -0.072708f, 0.82483f, + -0.645088f, -0.209547f, 0.734814f, -0.538747f, -0.174169f, 0.824268f, -0.560687f, -0.072708f, 0.82483f, -0.682094f, -0.088945f, 0.725836f, + -0.682094f, -0.088945f, 0.725836f, -0.560687f, -0.072708f, 0.82483f, -0.565774f, -0.020551f, 0.824304f, -0.69385f, -0.025062f, 0.719683f, + -0.693736f, 0.024972f, 0.719796f, -0.695847f, 1.1E-5f, 0.71819f, -0.565837f, -1.0E-6f, 0.824517f, -0.565768f, 0.020427f, 0.824311f, + -0.695847f, 1.1E-5f, 0.71819f, -0.69385f, -0.025062f, 0.719683f, -0.565774f, -0.020551f, 0.824304f, -0.565837f, -1.0E-6f, 0.824517f, + -0.565837f, -1.0E-6f, 0.824517f, -0.565774f, -0.020551f, 0.824304f, -0.367244f, -0.014617f, 0.93001f, -0.36714f, -1.0E-6f, 0.930166f, + -0.565768f, 0.020427f, 0.824311f, -0.565837f, -1.0E-6f, 0.824517f, -0.36714f, -1.0E-6f, 0.930166f, -0.367245f, 0.014528f, 0.930011f, + -0.367244f, -0.014617f, 0.93001f, -0.221f, -0.010721f, 0.975215f, -0.220914f, -1.0E-6f, 0.975293f, -0.36714f, -1.0E-6f, 0.930166f, + -0.36714f, -1.0E-6f, 0.930166f, -0.220914f, -1.0E-6f, 0.975293f, -0.220997f, 0.010655f, 0.975216f, -0.367245f, 0.014528f, 0.930011f, + 0.010878f, 0.222561f, 0.974858f, 0.037001f, 0.222307f, 0.974274f, 0.050884f, 0.367932f, 0.92846f, 0.01482f, 0.369601f, 0.929072f, + 0.037001f, 0.222307f, 0.974274f, 0.084603f, 0.221056f, 0.971585f, 0.117939f, 0.361173f, 0.92501f, 0.050884f, 0.367932f, 0.92846f, + 0.050884f, 0.367932f, 0.92846f, 0.117939f, 0.361173f, 0.92501f, 0.169134f, 0.541105f, 0.823771f, 0.072381f, 0.563194f, 0.823149f, + 0.020804f, 0.568602f, 0.82235f, 0.01482f, 0.369601f, 0.929072f, 0.050884f, 0.367932f, 0.92846f, 0.072381f, 0.563194f, 0.823149f, + 0.084603f, 0.221056f, 0.971585f, 0.139597f, 0.218066f, 0.965898f, 0.200629f, 0.347092f, 0.91612f, 0.117939f, 0.361173f, 0.92501f, + 0.139597f, 0.218066f, 0.965898f, 0.213531f, 0.212993f, 0.953435f, 0.299149f, 0.298419f, 0.906342f, 0.200629f, 0.347092f, 0.91612f, + 0.200629f, 0.347092f, 0.91612f, 0.299149f, 0.298419f, 0.906342f, 0.405489f, 0.404531f, 0.819716f, 0.285031f, 0.494036f, 0.821393f, + 0.117939f, 0.361173f, 0.92501f, 0.200629f, 0.347092f, 0.91612f, 0.285031f, 0.494036f, 0.821393f, 0.169134f, 0.541105f, 0.823771f, + 0.285031f, 0.494036f, 0.821393f, 0.405489f, 0.404531f, 0.819716f, 0.4693f, 0.468325f, 0.748619f, 0.335556f, 0.576804f, 0.744781f, + 0.169134f, 0.541105f, 0.823771f, 0.285031f, 0.494036f, 0.821393f, 0.335556f, 0.576804f, 0.744781f, 0.204073f, 0.64709f, 0.734595f, + 0.072381f, 0.563194f, 0.823149f, 0.169134f, 0.541105f, 0.823771f, 0.204073f, 0.64709f, 0.734595f, 0.088715f, 0.684119f, 0.723955f, + 0.020804f, 0.568602f, 0.82235f, 0.072381f, 0.563194f, 0.823149f, 0.088715f, 0.684119f, 0.723955f, 0.025388f, 0.696365f, 0.717239f, + 0.010835f, -0.23565f, 0.971778f, 0.014687f, -0.38921f, 0.921032f, 0.050418f, -0.38752f, 0.920482f, 0.036837f, -0.235391f, 0.971203f, + 0.050418f, -0.38752f, 0.920482f, 0.014687f, -0.38921f, 0.921032f, 0.020387f, -0.591837f, 0.8058f, 0.070967f, -0.586467f, 0.806858f, + 0.116885f, -0.380591f, 0.917327f, 0.050418f, -0.38752f, 0.920482f, 0.070967f, -0.586467f, 0.806858f, 0.166076f, -0.564345f, 0.808662f, + 0.036837f, -0.235391f, 0.971203f, 0.050418f, -0.38752f, 0.920482f, 0.116885f, -0.380591f, 0.917327f, 0.084225f, -0.234121f, 0.968552f, + 0.020387f, -0.591837f, 0.8058f, 0.02469f, -0.717725f, 0.695889f, 0.086571f, -0.705739f, 0.703163f, 0.070967f, -0.586467f, 0.806858f, + 0.070967f, -0.586467f, 0.806858f, 0.086571f, -0.705739f, 0.703163f, 0.199773f, -0.669232f, 0.715695f, 0.166076f, -0.564345f, 0.808662f, + 0.116885f, -0.380591f, 0.917327f, 0.166076f, -0.564345f, 0.808662f, 0.280776f, -0.516844f, 0.808725f, 0.198928f, -0.366325f, 0.908974f, + 0.166076f, -0.564345f, 0.808662f, 0.199773f, -0.669232f, 0.715695f, 0.33043f, -0.598851f, 0.729516f, 0.280776f, -0.516844f, 0.808725f, + 0.280776f, -0.516844f, 0.808725f, 0.33043f, -0.598851f, 0.729516f, 0.464547f, -0.488911f, 0.738351f, 0.401261f, -0.425239f, 0.811271f, + 0.280776f, -0.516844f, 0.808725f, 0.401261f, -0.425239f, 0.811271f, 0.297154f, -0.315494f, 0.901201f, 0.198928f, -0.366325f, 0.908974f, + 0.084225f, -0.234121f, 0.968552f, 0.116885f, -0.380591f, 0.917327f, 0.198928f, -0.366325f, 0.908974f, 0.138923f, -0.231173f, 0.962943f, + 0.138923f, -0.231173f, 0.962943f, 0.198928f, -0.366325f, 0.908974f, 0.297154f, -0.315494f, 0.901201f, 0.212501f, -0.226048f, 0.950655f, + 0.007169f, -0.00707f, 0.999949f, 0.007179f, -0.025559f, 0.999648f, 0.025473f, -0.02556f, 0.999349f, 0.025479f, -0.007087f, 0.99965f, + 0.007179f, -0.025559f, 0.999648f, 0.007472f, -0.063716f, 0.99794f, 0.02618f, -0.063744f, 0.997623f, 0.025473f, -0.02556f, 0.999349f, + 0.025473f, -0.02556f, 0.999349f, 0.02618f, -0.063744f, 0.997623f, 0.062764f, -0.064559f, 0.995938f, 0.061979f, -0.026292f, 0.997731f, + 0.025479f, -0.007087f, 0.99965f, 0.025473f, -0.02556f, 0.999349f, 0.061979f, -0.026292f, 0.997731f, 0.061944f, -0.007387f, 0.998052f, + 0.007472f, -0.063716f, 0.99794f, 0.008329f, -0.119124f, 0.992845f, 0.028568f, -0.119188f, 0.992461f, 0.02618f, -0.063744f, 0.997623f, + 0.008329f, -0.119124f, 0.992845f, 0.010835f, -0.23565f, 0.971778f, 0.036837f, -0.235391f, 0.971203f, 0.028568f, -0.119188f, 0.992461f, + 0.028568f, -0.119188f, 0.992461f, 0.036837f, -0.235391f, 0.971203f, 0.084225f, -0.234121f, 0.968552f, 0.066426f, -0.119489f, 0.990611f, + 0.02618f, -0.063744f, 0.997623f, 0.028568f, -0.119188f, 0.992461f, 0.066426f, -0.119489f, 0.990611f, 0.062764f, -0.064559f, 0.995938f, + 0.062764f, -0.064559f, 0.995938f, 0.066426f, -0.119489f, 0.990611f, 0.114563f, -0.120018f, 0.98614f, 0.113981f, -0.068259f, 0.991135f, + 0.066426f, -0.119489f, 0.990611f, 0.084225f, -0.234121f, 0.968552f, 0.138923f, -0.231173f, 0.962943f, 0.114563f, -0.120018f, 0.98614f, + 0.114563f, -0.120018f, 0.98614f, 0.138923f, -0.231173f, 0.962943f, 0.212501f, -0.226048f, 0.950655f, 0.218237f, -0.145906f, 0.964927f, + 0.113981f, -0.068259f, 0.991135f, 0.114563f, -0.120018f, 0.98614f, 0.218237f, -0.145906f, 0.964927f, 0.221558f, -0.086713f, 0.971284f, + 0.061944f, -0.007387f, 0.998052f, 0.061979f, -0.026292f, 0.997731f, 0.113708f, -0.028673f, 0.9931f, 0.113635f, -0.008231f, 0.993489f, + 0.061979f, -0.026292f, 0.997731f, 0.062764f, -0.064559f, 0.995938f, 0.113981f, -0.068259f, 0.991135f, 0.113708f, -0.028673f, 0.9931f, + 0.113708f, -0.028673f, 0.9931f, 0.113981f, -0.068259f, 0.991135f, 0.221558f, -0.086713f, 0.971284f, 0.222823f, -0.037022f, 0.974156f, + 0.113635f, -0.008231f, 0.993489f, 0.113708f, -0.028673f, 0.9931f, 0.222823f, -0.037022f, 0.974156f, 0.223053f, -0.010715f, 0.974747f, + 0.00717f, 0.007027f, 0.99995f, 0.007189f, 0.0f, 0.999974f, 0.025542f, 0.0f, 0.999674f, 0.025482f, 0.007044f, 0.999651f, + 0.007189f, 0.0f, 0.999974f, 0.007169f, -0.00707f, 0.999949f, 0.025479f, -0.007087f, 0.99965f, 0.025542f, 0.0f, 0.999674f, + 0.025542f, 0.0f, 0.999674f, 0.025479f, -0.007087f, 0.99965f, 0.061944f, -0.007387f, 0.998052f, 0.061996f, 0.0f, 0.998076f, + 0.025482f, 0.007044f, 0.999651f, 0.025542f, 0.0f, 0.999674f, 0.061996f, 0.0f, 0.998076f, 0.061948f, 0.007344f, 0.998052f, + 0.061944f, -0.007387f, 0.998052f, 0.113635f, -0.008231f, 0.993489f, 0.11363f, 0.0f, 0.993523f, 0.061996f, 0.0f, 0.998076f, + 0.113635f, -0.008231f, 0.993489f, 0.223053f, -0.010715f, 0.974747f, 0.222967f, -1.0E-6f, 0.974826f, 0.11363f, 0.0f, 0.993523f, + 0.11363f, 0.0f, 0.993523f, 0.222967f, -1.0E-6f, 0.974826f, 0.223051f, 0.010649f, 0.974749f, 0.113637f, 0.008184f, 0.993489f, + 0.061996f, 0.0f, 0.998076f, 0.11363f, 0.0f, 0.993523f, 0.113637f, 0.008184f, 0.993489f, 0.061948f, 0.007344f, 0.998052f, + -0.693736f, 0.024972f, 0.719796f, -0.565768f, 0.020427f, 0.824311f, -0.560511f, 0.071322f, 0.82507f, -0.681667f, 0.087549f, 0.726406f, + -0.560511f, 0.071322f, 0.82507f, -0.565768f, 0.020427f, 0.824311f, -0.367245f, 0.014528f, 0.930011f, -0.365644f, 0.050051f, 0.929408f, + -0.53875f, 0.167715f, 0.825603f, -0.560511f, 0.071322f, 0.82507f, -0.365644f, 0.050051f, 0.929408f, -0.359059f, 0.116722f, 0.925987f, + -0.681667f, 0.087549f, 0.726406f, -0.560511f, 0.071322f, 0.82507f, -0.53875f, 0.167715f, 0.825603f, -0.644943f, 0.202621f, 0.736881f, + -0.367245f, 0.014528f, 0.930011f, -0.220997f, 0.010655f, 0.975216f, -0.220758f, 0.036362f, 0.974651f, -0.365644f, 0.050051f, 0.929408f, + -0.365644f, 0.050051f, 0.929408f, -0.220758f, 0.036362f, 0.974651f, -0.219543f, 0.083629f, 0.972012f, -0.359059f, 0.116722f, 0.925987f, + -0.53875f, 0.167715f, 0.825603f, -0.359059f, 0.116722f, 0.925987f, -0.34505f, 0.199733f, 0.917086f, -0.491757f, 0.284219f, 0.82304f, + -0.359059f, 0.116722f, 0.925987f, -0.219543f, 0.083629f, 0.972012f, -0.216564f, 0.138788f, 0.966353f, -0.34505f, 0.199733f, 0.917086f, + -0.34505f, 0.199733f, 0.917086f, -0.216564f, 0.138788f, 0.966353f, -0.211482f, 0.213152f, 0.953856f, -0.296456f, 0.298724f, 0.907126f, + -0.34505f, 0.199733f, 0.917086f, -0.296456f, 0.298724f, 0.907126f, -0.402197f, 0.405178f, 0.821017f, -0.491757f, 0.284219f, 0.82304f, + -0.644943f, 0.202621f, 0.736881f, -0.53875f, 0.167715f, 0.825603f, -0.491757f, 0.284219f, 0.82304f, -0.574618f, 0.33479f, 0.746813f, + -0.574618f, 0.33479f, 0.746813f, -0.491757f, 0.284219f, 0.82304f, -0.402197f, 0.405178f, 0.821017f, -0.466013f, 0.469045f, 0.75022f, + 0.223051f, 0.010649f, 0.974749f, 0.37035f, 0.014508f, 0.928779f, 0.368745f, 0.04998f, 0.928186f, 0.222811f, 0.036337f, 0.974184f, + 0.368745f, 0.04998f, 0.928186f, 0.37035f, 0.014508f, 0.928779f, 0.569522f, 0.020364f, 0.821724f, 0.564266f, 0.071105f, 0.822525f, + 0.362133f, 0.116561f, 0.92481f, 0.368745f, 0.04998f, 0.928186f, 0.564266f, 0.071105f, 0.822525f, 0.54249f, 0.167243f, 0.823246f, + 0.222811f, 0.036337f, 0.974184f, 0.368745f, 0.04998f, 0.928186f, 0.362133f, 0.116561f, 0.92481f, 0.221593f, 0.083571f, 0.971552f, + 0.569522f, 0.020364f, 0.821724f, 0.697248f, 0.024864f, 0.716398f, 0.685209f, 0.08722f, 0.723105f, 0.564266f, 0.071105f, 0.822525f, + 0.564266f, 0.071105f, 0.822525f, 0.685209f, 0.08722f, 0.723105f, 0.648546f, 0.20196f, 0.733894f, 0.54249f, 0.167243f, 0.823246f, + 0.362133f, 0.116561f, 0.92481f, 0.54249f, 0.167243f, 0.823246f, 0.495412f, 0.283564f, 0.821071f, 0.348093f, 0.199473f, 0.915992f, + 0.54249f, 0.167243f, 0.823246f, 0.648546f, 0.20196f, 0.733894f, 0.578173f, 0.334012f, 0.744414f, 0.495412f, 0.283564f, 0.821071f, + 0.495412f, 0.283564f, 0.821071f, 0.578173f, 0.334012f, 0.744414f, 0.4693f, 0.468325f, 0.748619f, 0.405489f, 0.404531f, 0.819716f, + 0.495412f, 0.283564f, 0.821071f, 0.405489f, 0.404531f, 0.819716f, 0.299149f, 0.298419f, 0.906342f, 0.348093f, 0.199473f, 0.915992f, + 0.221593f, 0.083571f, 0.971552f, 0.362133f, 0.116561f, 0.92481f, 0.348093f, 0.199473f, 0.915992f, 0.218621f, 0.138683f, 0.965905f, + 0.218621f, 0.138683f, 0.965905f, 0.348093f, 0.199473f, 0.915992f, 0.299149f, 0.298419f, 0.906342f, 0.213531f, 0.212993f, 0.953435f, + 0.010878f, 0.222561f, 0.974858f, 0.008351f, 0.113056f, 0.993554f, 0.028645f, 0.113157f, 0.993164f, 0.037001f, 0.222307f, 0.974274f, + 0.008351f, 0.113056f, 0.993554f, 0.007491f, 0.061287f, 0.998092f, 0.026239f, 0.061352f, 0.997771f, 0.028645f, 0.113157f, 0.993164f, + 0.028645f, 0.113157f, 0.993164f, 0.026239f, 0.061352f, 0.997771f, 0.062873f, 0.062197f, 0.996082f, 0.066588f, 0.113508f, 0.991303f, + 0.037001f, 0.222307f, 0.974274f, 0.028645f, 0.113157f, 0.993164f, 0.066588f, 0.113508f, 0.991303f, 0.084603f, 0.221056f, 0.971585f, + 0.007491f, 0.061287f, 0.998092f, 0.007187f, 0.025058f, 0.99966f, 0.025494f, 0.025072f, 0.999361f, 0.026239f, 0.061352f, 0.997771f, + 0.007187f, 0.025058f, 0.99966f, 0.00717f, 0.007027f, 0.99995f, 0.025482f, 0.007044f, 0.999651f, 0.025494f, 0.025072f, 0.999361f, + 0.025494f, 0.025072f, 0.999361f, 0.025482f, 0.007044f, 0.999651f, 0.061948f, 0.007344f, 0.998052f, 0.062015f, 0.025807f, 0.997742f, + 0.026239f, 0.061352f, 0.997771f, 0.025494f, 0.025072f, 0.999361f, 0.062015f, 0.025807f, 0.997742f, 0.062873f, 0.062197f, 0.996082f, + 0.062873f, 0.062197f, 0.996082f, 0.062015f, 0.025807f, 0.997742f, 0.113738f, 0.028159f, 0.993112f, 0.114097f, 0.065833f, 0.991286f, + 0.062015f, 0.025807f, 0.997742f, 0.061948f, 0.007344f, 0.998052f, 0.113637f, 0.008184f, 0.993489f, 0.113738f, 0.028159f, 0.993112f, + 0.113738f, 0.028159f, 0.993112f, 0.113637f, 0.008184f, 0.993489f, 0.223051f, 0.010649f, 0.974749f, 0.222811f, 0.036337f, 0.974184f, + 0.114097f, 0.065833f, 0.991286f, 0.113738f, 0.028159f, 0.993112f, 0.222811f, 0.036337f, 0.974184f, 0.221593f, 0.083571f, 0.971552f, + 0.084603f, 0.221056f, 0.971585f, 0.066588f, 0.113508f, 0.991303f, 0.114794f, 0.114134f, 0.986811f, 0.139597f, 0.218066f, 0.965898f, + 0.066588f, 0.113508f, 0.991303f, 0.062873f, 0.062197f, 0.996082f, 0.114097f, 0.065833f, 0.991286f, 0.114794f, 0.114134f, 0.986811f, + 0.114794f, 0.114134f, 0.986811f, 0.114097f, 0.065833f, 0.991286f, 0.221593f, 0.083571f, 0.971552f, 0.218621f, 0.138683f, 0.965905f, + 0.139597f, 0.218066f, 0.965898f, 0.114794f, 0.114134f, 0.986811f, 0.218621f, 0.138683f, 0.965905f, 0.213531f, 0.212993f, 0.953435f, + 0.007491f, 0.061287f, 0.998092f, 0.008351f, 0.113056f, 0.993554f, 0.0f, 0.113048f, 0.99359f, 0.0f, 0.061335f, 0.998117f, + 0.008351f, 0.113056f, 0.993554f, 0.010878f, 0.222561f, 0.974858f, 0.0f, 0.222477f, 0.974938f, 0.0f, 0.113048f, 0.99359f, + 0.0f, 0.113048f, 0.99359f, 0.0f, 0.222477f, 0.974938f, -0.010867f, 0.22256f, 0.974858f, -0.008343f, 0.113057f, 0.993554f, + 0.0f, 0.061335f, 0.998117f, 0.0f, 0.113048f, 0.99359f, -0.008343f, 0.113057f, 0.993554f, -0.007484f, 0.061287f, 0.998092f, + 0.007491f, 0.061287f, 0.998092f, 0.0f, 0.061335f, 0.998117f, 0.0f, 0.025116f, 0.999685f, 0.007187f, 0.025058f, 0.99966f, + 0.0f, 0.061335f, 0.998117f, -0.007484f, 0.061287f, 0.998092f, -0.00718f, 0.025059f, 0.99966f, 0.0f, 0.025116f, 0.999685f, + 0.0f, 0.025116f, 0.999685f, -0.00718f, 0.025059f, 0.99966f, -0.007163f, 0.007027f, 0.99995f, 0.0f, 0.007045f, 0.999975f, + 0.007187f, 0.025058f, 0.99966f, 0.0f, 0.025116f, 0.999685f, 0.0f, 0.007045f, 0.999975f, 0.00717f, 0.007027f, 0.99995f, + -0.220997f, 0.010655f, 0.975216f, -0.112675f, 0.008187f, 0.993598f, -0.112781f, 0.02817f, 0.993221f, -0.220758f, 0.036362f, 0.974651f, + -0.112675f, 0.008187f, 0.993598f, -0.061553f, 0.007347f, 0.998077f, -0.061625f, 0.025816f, 0.997765f, -0.112781f, 0.02817f, 0.993221f, + -0.112781f, 0.02817f, 0.993221f, -0.061625f, 0.025816f, 0.997765f, -0.062487f, 0.062214f, 0.996105f, -0.113147f, 0.065858f, 0.991393f, + -0.220758f, 0.036362f, 0.974651f, -0.112781f, 0.02817f, 0.993221f, -0.113147f, 0.065858f, 0.991393f, -0.219543f, 0.083629f, 0.972012f, + -0.061553f, 0.007347f, 0.998077f, -0.025398f, 0.007046f, 0.999653f, -0.025412f, 0.025076f, 0.999363f, -0.061625f, 0.025816f, 0.997765f, + -0.025398f, 0.007046f, 0.999653f, -0.007163f, 0.007027f, 0.99995f, -0.00718f, 0.025059f, 0.99966f, -0.025412f, 0.025076f, 0.999363f, + -0.025412f, 0.025076f, 0.999363f, -0.00718f, 0.025059f, 0.99966f, -0.007484f, 0.061287f, 0.998092f, -0.026157f, 0.061358f, 0.997773f, + -0.061625f, 0.025816f, 0.997765f, -0.025412f, 0.025076f, 0.999363f, -0.026157f, 0.061358f, 0.997773f, -0.062487f, 0.062214f, 0.996105f, + -0.062487f, 0.062214f, 0.996105f, -0.026157f, 0.061358f, 0.997773f, -0.028558f, 0.113162f, 0.993166f, -0.066192f, 0.113526f, 0.991328f, + -0.026157f, 0.061358f, 0.997773f, -0.007484f, 0.061287f, 0.998092f, -0.008343f, 0.113057f, 0.993554f, -0.028558f, 0.113162f, 0.993166f, + -0.028558f, 0.113162f, 0.993166f, -0.008343f, 0.113057f, 0.993554f, -0.010867f, 0.22256f, 0.974858f, -0.036885f, 0.222305f, 0.974279f, + -0.066192f, 0.113526f, 0.991328f, -0.028558f, 0.113162f, 0.993166f, -0.036885f, 0.222305f, 0.974279f, -0.084089f, 0.221062f, 0.971628f, + -0.219543f, 0.083629f, 0.972012f, -0.113147f, 0.065858f, 0.991393f, -0.113857f, 0.11417f, 0.986915f, -0.216564f, 0.138788f, 0.966353f, + -0.113147f, 0.065858f, 0.991393f, -0.062487f, 0.062214f, 0.996105f, -0.066192f, 0.113526f, 0.991328f, -0.113857f, 0.11417f, 0.986915f, + -0.113857f, 0.11417f, 0.986915f, -0.066192f, 0.113526f, 0.991328f, -0.084089f, 0.221062f, 0.971628f, -0.138447f, 0.218126f, 0.966051f, + -0.216564f, 0.138788f, 0.966353f, -0.113857f, 0.11417f, 0.986915f, -0.138447f, 0.218126f, 0.966051f, -0.211482f, 0.213152f, 0.953856f, }; const float cfGameIconStrokeVtxs[] = -{ --0.376756459475,1.046143651009f,0.0f, --0.512206375599f,1.039104461670f,0.0f, --0.613150417805f,1.029256582260f,0.0f, --0.688333272934f,1.016606807709f,0.0f, --0.746499598026f,1.001162052155f,0.0f, --0.796394228935f,0.982929229736,0.0f, --0.839153468609,0.961680650711,0.0f, --0.875913500786,0.93718868494,0.0f, --0.907810747623,0.909225344658,0.0f, --0.93598151207,0.877562940121,0.0f, --0.960655272007,0.840993285179,0.0f, --0.982061386108,0.79830801487,0.0f, --1.00042927265,0.748299062252,0.0f, --1.015988588333,0.689758002758,0.0f, --1.028732180595,0.613717556,0.0f, --1.038653135300,0.511210441589,0.0f, --1.045744538307,0.373269081116,0.0f, --1.049999356270,0.190926194191,0.0f, --1.051417708397,-1.349482312799E-002,0.0f, --1.049999356270,-0.217670500278,0.0f, --1.04574441910,-0.399277359247,0.0f, --1.038653135300,-0.535992026329,0.0f, --1.028732180595,-0.636890649796,0.0f, --1.015988588333,-0.711049556732,0.0f, --1.00042927265,-0.767545044422,0.0f, --0.982061386108,-0.815453350544,0.0f, --0.960655212402,-0.856050789356,0.0f, --0.93598151207,-0.890613555908,0.0f, --0.907810747623,-0.920418143272,0.0f, --0.875913500786,-0.946740865707,0.0f, --0.839153468609,-0.969795942307,0.0f, --0.796394228935,-0.989797830582,0.0f, --0.746499598026,-1.006960868835,0.0f, --0.688333272934,-1.021499633789,0.0f, --0.613150477409,-1.033407211304,0.0f, --0.512206375599,-1.042677521706,0.0f, --0.376756429672,-1.049303770065,0.0f, --0.19805586338,-1.053279519081,0.0f, -2.249561250210E-003,-1.054604768753,0.0f, -0.202514111996,-1.053279519081,0.0f, -0.381092041731,-1.049303770065,0.0f, -0.516337633133,-1.042677521706,0.0f, -0.617013633251,-1.033407211304,0.0f, -0.691882967949,-1.021499633789,0.0f, -0.749708354473,-1.006960868835,0.0f, -0.79925262928,-0.989797830582,0.0f, -0.841663658619,-0.969795942307,0.0f, -0.87808907032,-0.946740865707,0.0f, -0.909676492214,-0.920418143272,0.0f, -0.93757379055,-0.890613555908,0.0f, -0.962008118629,-0.856050789356,0.0f, -0.983206510544,-0.815453350544,0.0f, -1.001396179199,-0.767545044422,0.0f, -1.016804218292,-0.711049556732,0.0f, -1.029423952103,-0.636890649796,0.0f, -1.039248347282,-0.535992026329,0.0f, -1.046270728111,-0.399277359247,0.0f, -1.050484061241,-0.217670500278,0.0f, -1.051888465881,-1.349482685328E-002,0.0f, -1.050484061241,0.190926194191,0.0f, -1.046270728111,0.373269081116,0.0f, -1.039248347282,0.511210441589,0.0f, -1.029423952103,0.613717556,0.0f, -1.016804218292,0.689758002758,0.0f, -1.001396059990,0.748299002647,0.0f, -0.983206450939,0.79830801487,0.0f, -0.962008118629,0.840993225574,0.0f, -0.93757379055,0.877562940121,0.0f, -0.909676492214,0.909225344658,0.0f, -0.87808907032,0.93718868494,0.0f, -0.841663658619,0.961680650711,0.0f, -0.79925262928,0.982929229736,0.0f, -0.749708354473,1.001162052155,0.0f, -0.691882967949,1.016606807709,0.0f, -0.617013692856,1.029256582260,0.0f, -0.516337633133,1.039104580879,0.0f, -0.381092071533,1.046143770218,0.0f, -0.202514111996,1.050367355347,0.0f, -2.249561250210E-003,1.051775097847,0.0f, --0.19805586338,1.050367236137,0.0f, --0.376756459475,1.046143651009,0.0f -}; + { + -0.376756459475, 1.046143651009f, 0.0f, + -0.512206375599f, 1.039104461670f, 0.0f, + -0.613150417805f, 1.029256582260f, 0.0f, + -0.688333272934f, 1.016606807709f, 0.0f, + -0.746499598026f, 1.001162052155f, 0.0f, + -0.796394228935f, 0.982929229736, 0.0f, + -0.839153468609, 0.961680650711, 0.0f, + -0.875913500786, 0.93718868494, 0.0f, + -0.907810747623, 0.909225344658, 0.0f, + -0.93598151207, 0.877562940121, 0.0f, + -0.960655272007, 0.840993285179, 0.0f, + -0.982061386108, 0.79830801487, 0.0f, + -1.00042927265, 0.748299062252, 0.0f, + -1.015988588333, 0.689758002758, 0.0f, + -1.028732180595, 0.613717556, 0.0f, + -1.038653135300, 0.511210441589, 0.0f, + -1.045744538307, 0.373269081116, 0.0f, + -1.049999356270, 0.190926194191, 0.0f, + -1.051417708397, -1.349482312799E-002, 0.0f, + -1.049999356270, -0.217670500278, 0.0f, + -1.04574441910, -0.399277359247, 0.0f, + -1.038653135300, -0.535992026329, 0.0f, + -1.028732180595, -0.636890649796, 0.0f, + -1.015988588333, -0.711049556732, 0.0f, + -1.00042927265, -0.767545044422, 0.0f, + -0.982061386108, -0.815453350544, 0.0f, + -0.960655212402, -0.856050789356, 0.0f, + -0.93598151207, -0.890613555908, 0.0f, + -0.907810747623, -0.920418143272, 0.0f, + -0.875913500786, -0.946740865707, 0.0f, + -0.839153468609, -0.969795942307, 0.0f, + -0.796394228935, -0.989797830582, 0.0f, + -0.746499598026, -1.006960868835, 0.0f, + -0.688333272934, -1.021499633789, 0.0f, + -0.613150477409, -1.033407211304, 0.0f, + -0.512206375599, -1.042677521706, 0.0f, + -0.376756429672, -1.049303770065, 0.0f, + -0.19805586338, -1.053279519081, 0.0f, + 2.249561250210E-003, -1.054604768753, 0.0f, + 0.202514111996, -1.053279519081, 0.0f, + 0.381092041731, -1.049303770065, 0.0f, + 0.516337633133, -1.042677521706, 0.0f, + 0.617013633251, -1.033407211304, 0.0f, + 0.691882967949, -1.021499633789, 0.0f, + 0.749708354473, -1.006960868835, 0.0f, + 0.79925262928, -0.989797830582, 0.0f, + 0.841663658619, -0.969795942307, 0.0f, + 0.87808907032, -0.946740865707, 0.0f, + 0.909676492214, -0.920418143272, 0.0f, + 0.93757379055, -0.890613555908, 0.0f, + 0.962008118629, -0.856050789356, 0.0f, + 0.983206510544, -0.815453350544, 0.0f, + 1.001396179199, -0.767545044422, 0.0f, + 1.016804218292, -0.711049556732, 0.0f, + 1.029423952103, -0.636890649796, 0.0f, + 1.039248347282, -0.535992026329, 0.0f, + 1.046270728111, -0.399277359247, 0.0f, + 1.050484061241, -0.217670500278, 0.0f, + 1.051888465881, -1.349482685328E-002, 0.0f, + 1.050484061241, 0.190926194191, 0.0f, + 1.046270728111, 0.373269081116, 0.0f, + 1.039248347282, 0.511210441589, 0.0f, + 1.029423952103, 0.613717556, 0.0f, + 1.016804218292, 0.689758002758, 0.0f, + 1.001396059990, 0.748299002647, 0.0f, + 0.983206450939, 0.79830801487, 0.0f, + 0.962008118629, 0.840993225574, 0.0f, + 0.93757379055, 0.877562940121, 0.0f, + 0.909676492214, 0.909225344658, 0.0f, + 0.87808907032, 0.93718868494, 0.0f, + 0.841663658619, 0.961680650711, 0.0f, + 0.79925262928, 0.982929229736, 0.0f, + 0.749708354473, 1.001162052155, 0.0f, + 0.691882967949, 1.016606807709, 0.0f, + 0.617013692856, 1.029256582260, 0.0f, + 0.516337633133, 1.039104580879, 0.0f, + 0.381092071533, 1.046143770218, 0.0f, + 0.202514111996, 1.050367355347, 0.0f, + 2.249561250210E-003, 1.051775097847, 0.0f, + -0.19805586338, 1.050367236137, 0.0f, + -0.376756459475, 1.046143651009, 0.0f + }; const uint32_t cuGameIconStrokeVtxCount = sizeof(cfGameIconStrokeVtxs) / (sizeof(float) * 3); diff --git a/src/gui/GuiIconGrid.cpp b/src/gui/GuiIconGrid.cpp index 9e35cf7..e76c3ac 100644 --- a/src/gui/GuiIconGrid.cpp +++ b/src/gui/GuiIconGrid.cpp @@ -25,35 +25,21 @@ #include "utils/logger.h" #include "gui/GameIcon.h" -GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex,bool sortByName) - : GuiTitleBrowser(w, h, GameIndex), - sortByName(sortByName), - particleBgImage(w, h, 50, 60.0f, 90.0f, 0.6f, 1.0f) - , buttonClickSound(Resources::GetSound("button_click.mp3")) - , gameTitle((char*)NULL, 52, glm::vec4(1.0f)) - , touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH) - , wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A) - , leftTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_LEFT | GuiTrigger::STICK_L_LEFT, true) - , rightTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_RIGHT | GuiTrigger::STICK_L_RIGHT, true) - , downTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_DOWN | GuiTrigger::STICK_L_DOWN, true) - , upTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_UP | GuiTrigger::STICK_L_UP, true) - , buttonATrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_A, true) - , buttonLTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_L, true) - , buttonRTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_R, true) - , leftButton(w, h) - , rightButton(w, h) - , downButton(w, h) - , upButton(w, h) - , launchButton(w, h) - , arrowRightImageData(Resources::GetImageData("rightArrow.png")) - , arrowLeftImageData(Resources::GetImageData("leftArrow.png")) - , arrowRightImage(arrowRightImageData) - , arrowLeftImage(arrowLeftImageData) - , arrowRightButton(arrowRightImage.getWidth(), arrowRightImage.getHeight()) - , arrowLeftButton(arrowLeftImage.getWidth(), arrowLeftImage.getHeight()) - , noIcon(Resources::GetFile("noGameIcon.png"), Resources::GetFileSize("noGameIcon.png"), GX2_TEX_CLAMP_MODE_MIRROR) - , emptyIcon(Resources::GetFile("iconEmpty.png"), Resources::GetFileSize("iconEmpty.png"), GX2_TEX_CLAMP_MODE_MIRROR) - , dragListener(w,h) { +GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex, bool sortByName) + : GuiTitleBrowser(w, h, GameIndex), + sortByName(sortByName), + particleBgImage(w, h, 50, 60.0f, 90.0f, 0.6f, 1.0f), buttonClickSound(Resources::GetSound("button_click.mp3")), gameTitle((char *) nullptr, 52, glm::vec4(1.0f)), + touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH), + wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A), + leftTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_LEFT | GuiTrigger::STICK_L_LEFT, true), + rightTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_RIGHT | GuiTrigger::STICK_L_RIGHT, true), + downTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_DOWN | GuiTrigger::STICK_L_DOWN, true), upTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_UP | GuiTrigger::STICK_L_UP, true), + buttonATrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_A, true), buttonLTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_L, true), + buttonRTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_R, true), leftButton(w, h), rightButton(w, h), downButton(w, h), upButton(w, h), launchButton(w, h), + arrowRightImageData(Resources::GetImageData("rightArrow.png")), arrowLeftImageData(Resources::GetImageData("leftArrow.png")), arrowRightImage(arrowRightImageData), + arrowLeftImage(arrowLeftImageData), arrowRightButton(arrowRightImage.getWidth(), arrowRightImage.getHeight()), arrowLeftButton(arrowLeftImage.getWidth(), arrowLeftImage.getHeight()), + noIcon(Resources::GetFile("noGameIcon.png"), Resources::GetFileSize("noGameIcon.png"), GX2_TEX_CLAMP_MODE_MIRROR), + emptyIcon(Resources::GetFile("iconEmpty.png"), Resources::GetFileSize("iconEmpty.png"), GX2_TEX_CLAMP_MODE_MIRROR), dragListener(w, h) { particleBgImage.setParent(this); setSelectedGame(GameIndex); @@ -112,10 +98,10 @@ GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex,bool sortByNam append(&arrowRightButton); // at most we are rendering 2 screens at the same time - for(int i = 0; i< MAX_COLS * MAX_ROWS *2; i++) { - GameIcon * image = new GameIcon(&emptyIcon); + for (int i = 0; i < MAX_COLS * MAX_ROWS * 2; i++) { + GameIcon *image = new GameIcon(&emptyIcon); emptyIcons.push_back(image); - GuiButton * button = new GuiButton(emptyIcon.getWidth(), emptyIcon.getHeight()); + GuiButton *button = new GuiButton(emptyIcon.getWidth(), emptyIcon.getHeight()); button->setImage(image); button->setPosition(0, 0); //button->setEffectGrow(); @@ -140,18 +126,18 @@ GuiIconGrid::GuiIconGrid(int32_t w, int32_t h, uint64_t GameIndex,bool sortByNam GuiIconGrid::~GuiIconGrid() { containerMutex.lock(); - for (auto const& x : gameInfoContainers) { + for (auto const &x: gameInfoContainers) { remove(x.second->button); delete x.second; } gameInfoContainers.clear(); containerMutex.unlock(); - for (auto const& x : emptyButtons) { + for (auto const &x: emptyButtons) { delete x; } - for (auto const& x : emptyIcons) { + for (auto const &x: emptyIcons) { delete x; } @@ -162,8 +148,8 @@ GuiIconGrid::~GuiIconGrid() { int32_t GuiIconGrid::offsetForTitleId(uint64_t titleId) { int32_t offset = -1; positionMutex.lock(); - for(uint32_t i = 0; i < position.size(); i++) { - if(position.at(i) == titleId) { + for (uint32_t i = 0; i < position.size(); i++) { + if (position.at(i) == titleId) { offset = i; break; } @@ -176,10 +162,10 @@ void GuiIconGrid::setSelectedGame(uint64_t idx) { this->selectedGame = idx; containerMutex.lock(); - GameInfoContainer * container = NULL; - for (auto const& x : gameInfoContainers) { + GameInfoContainer *container = nullptr; + for (auto const &x: gameInfoContainers) { container = x.second; - if(x.first == idx) { + if (x.first == idx) { container->image->setSelected(true); gameTitle.setText(container->info->name.c_str()); } else { @@ -189,9 +175,9 @@ void GuiIconGrid::setSelectedGame(uint64_t idx) { containerMutex.unlock(); int32_t offset = offsetForTitleId(getSelectedGame()); - if(offset > 0) { + if (offset > 0) { uint32_t newPage = offset / (MAX_COLS * MAX_ROWS); - if(newPage != (uint32_t) curPage) { + if (newPage != (uint32_t) curPage) { curPage = newPage; bUpdatePositions = true; } @@ -202,7 +188,7 @@ uint64_t GuiIconGrid::getSelectedGame(void) { return selectedGame; } -void GuiIconGrid::OnGameTitleListUpdated(GameList * gameList) { +void GuiIconGrid::OnGameTitleListUpdated(GameList *gameList) { gameList->lock(); containerMutex.lock(); positionMutex.lock(); @@ -210,16 +196,16 @@ void GuiIconGrid::OnGameTitleListUpdated(GameList * gameList) { auto it = gameInfoContainers.begin(); while (it != gameInfoContainers.end()) { bool wasFound = false; - for(int32_t i = 0; i < gameList->size(); i++) { - gameInfo * info = gameList->at(i); - if(info != NULL && info->titleId == it->first) { + for (int32_t i = 0; i < gameList->size(); i++) { + gameInfo *info = gameList->at(i); + if (info != nullptr && info->titleId == it->first) { wasFound = true; break; } } if (!wasFound) { - DEBUG_FUNCTION_LINE("Removing %016llX\n", it->first); + DEBUG_FUNCTION_LINE("Removing %016llX", it->first); remove(it->second->button); delete it->second; it = gameInfoContainers.erase(it); @@ -228,17 +214,17 @@ void GuiIconGrid::OnGameTitleListUpdated(GameList * gameList) { } } - for(int32_t i = 0; i < gameList->size(); i++) { - gameInfo * info = gameList->at(i); - GameInfoContainer * container = NULL; + for (int32_t i = 0; i < gameList->size(); i++) { + gameInfo *info = gameList->at(i); + GameInfoContainer *container = nullptr; - for (auto const& x : gameInfoContainers) { - if(info->titleId == x.first) { + for (auto const &x: gameInfoContainers) { + if (info->titleId == x.first) { container = x.second; break; } } - if(container == NULL) { + if (container == nullptr) { OnGameTitleAdded(info); } } @@ -266,19 +252,19 @@ void GuiIconGrid::OnRightArrowClick(GuiButton *button, const GuiController *cont void GuiIconGrid::OnLeftClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { int32_t offset = offsetForTitleId(getSelectedGame()); - if(offset < 0) { + if (offset < 0) { return; } - if((offset % MAX_COLS) == 0) { + if ((offset % MAX_COLS) == 0) { offset -= ((MAX_COLS * MAX_ROWS) - MAX_COLS) + 1; } else { offset--; } - if(offset < 0 || position.empty()) { + if (offset < 0 || position.empty()) { return; } uint64_t newTitleId = position.at(offset); - if(newTitleId > 0) { + if (newTitleId > 0) { setSelectedGame(newTitleId); gameSelectionChanged(this, selectedGame); } @@ -287,19 +273,19 @@ void GuiIconGrid::OnLeftClick(GuiButton *button, const GuiController *controller void GuiIconGrid::OnRightClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { int32_t offset = offsetForTitleId(getSelectedGame()); - if(offset < 0) { + if (offset < 0) { return; } - if((offset % MAX_COLS) == MAX_COLS - 1) { + if ((offset % MAX_COLS) == MAX_COLS - 1) { offset += ((MAX_COLS * MAX_ROWS) - MAX_COLS) + 1; } else { offset++; } - if((uint32_t) offset >= position.size()) { + if ((uint32_t) offset >= position.size()) { return; } uint64_t newTitleId = position.at(offset); - if(newTitleId > 0) { + if (newTitleId > 0) { setSelectedGame(newTitleId); gameSelectionChanged(this, selectedGame); } @@ -307,40 +293,41 @@ void GuiIconGrid::OnRightClick(GuiButton *button, const GuiController *controlle void GuiIconGrid::OnDownClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { int32_t offset = offsetForTitleId(getSelectedGame()); - if(offset < 0) { + if (offset < 0) { return; } - if(offset % (MAX_COLS * MAX_ROWS) < (MAX_COLS * MAX_ROWS) - MAX_COLS) { + if (offset % (MAX_COLS * MAX_ROWS) < (MAX_COLS * MAX_ROWS) - MAX_COLS) { offset = offset + MAX_COLS; } else { return; } - if((uint32_t) offset >= position.size()) { + if ((uint32_t) offset >= position.size()) { return; } uint64_t newTitleId = position.at(offset); - if(newTitleId > 0) { + if (newTitleId > 0) { setSelectedGame(newTitleId); gameSelectionChanged(this, selectedGame); } } + void GuiIconGrid::OnUpClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { int32_t offset = offsetForTitleId(getSelectedGame()); - if(offset < 0) { + if (offset < 0) { return; } - if(offset % (MAX_COLS * MAX_ROWS) >= MAX_COLS) { + if (offset % (MAX_COLS * MAX_ROWS) >= MAX_COLS) { offset = offset - MAX_COLS; } else { return; } - if(offset < 0) { + if (offset < 0) { return; } uint64_t newTitleId = position.at(offset); - if(newTitleId > 0) { + if (newTitleId > 0) { setSelectedGame(newTitleId); gameSelectionChanged(this, selectedGame); } @@ -348,18 +335,18 @@ void GuiIconGrid::OnUpClick(GuiButton *button, const GuiController *controller, void GuiIconGrid::OnLaunchClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { //! do not auto launch when wiimote is pointing to screen and presses A - if((trigger == &buttonATrigger) && (controller->chan & (GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5)) && controller->data.validPointer) { + if ((trigger == &buttonATrigger) && (controller->chan & (GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5)) && controller->data.validPointer) { return; } - DEBUG_FUNCTION_LINE("Tried to launch %s (%016llX)\n", gameInfoContainers[getSelectedGame()]->info->name.c_str(),getSelectedGame()); + DEBUG_FUNCTION_LINE("Tried to launch %s (%016llX)", gameInfoContainers[getSelectedGame()]->info->name.c_str(), getSelectedGame()); gameLaunchClicked(this, getSelectedGame()); } void GuiIconGrid::OnLeftArrowHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { - if(currentlyHeld != NULL) { - if(lArrowHeldCounter++ > 30) { - OnLeftArrowClick(button,controller,trigger); + if (currentlyHeld != nullptr) { + if (lArrowHeldCounter++ > 30) { + OnLeftArrowClick(button, controller, trigger); lArrowHeldCounter = 0; } } else { @@ -372,10 +359,10 @@ void GuiIconGrid::OnLeftArrowReleased(GuiButton *button, const GuiController *co } void GuiIconGrid::OnRightArrowHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { - if(currentlyHeld != NULL) { - if(rArrowHeldCounter++ > 30) { - DEBUG_FUNCTION_LINE("CLICK\n"); - OnRightArrowClick(button,controller,trigger); + if (currentlyHeld != nullptr) { + if (rArrowHeldCounter++ > 30) { + DEBUG_FUNCTION_LINE("CLICK"); + OnRightArrowClick(button, controller, trigger); rArrowHeldCounter = 0; } } else { @@ -389,20 +376,20 @@ void GuiIconGrid::OnRightArrowReleased(GuiButton *button, const GuiController *c void GuiIconGrid::OnGameButtonHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { - if(currentlyHeld == NULL) { + if (currentlyHeld == nullptr) { bool found = false; // We don't want to drag empty buttons - for(auto const & x : emptyButtons) { - if(x == button) { - found = true; + for (auto const &x: emptyButtons) { + if (x == button) { + found = true; break; } } - if(!found) { + if (!found) { currentlyHeld = button; } } - if(currentlyHeld != NULL && currentlyHeld != button) { + if (currentlyHeld != nullptr && currentlyHeld != button) { dragTarget = button; } } @@ -415,20 +402,20 @@ void GuiIconGrid::OnGameButtonPointedOff(GuiButton *button, const GuiController } -void GuiIconGrid::OnDrag(GuiDragListener * element, const GuiController *controller, GuiTrigger *trigger, int32_t dx, int32_t dy) { - if(currentlyHeld != NULL) { +void GuiIconGrid::OnDrag(GuiDragListener *element, const GuiController *controller, GuiTrigger *trigger, int32_t dx, int32_t dy) { + if (currentlyHeld != nullptr) { currentlyHeld->setPosition(currentlyHeld->getOffsetX() + dx, currentlyHeld->getOffsetY() + dy); } // reset the target when we move. - dragTarget = NULL; + dragTarget = nullptr; } void GuiIconGrid::OnGameButtonClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger) { containerMutex.lock(); - for (auto const& x : gameInfoContainers) { - if(x.second->button == button) { - if(selectedGame == (x.second->info->titleId)) { - if(gameLaunchTimer < 30) + for (auto const &x: gameInfoContainers) { + if (x.second->button == button) { + if (selectedGame == (x.second->info->titleId)) { + if (gameLaunchTimer < 30) OnLaunchClick(button, controller, trigger); } else { setSelectedGame(x.second->info->titleId); @@ -441,19 +428,19 @@ void GuiIconGrid::OnGameButtonClick(GuiButton *button, const GuiController *cont containerMutex.unlock(); } -void GuiIconGrid::OnGameTitleAdded(gameInfo * info) { - DEBUG_FUNCTION_LINE("Adding %016llX\n", info->titleId); - GuiImageData * imageData = &noIcon; - if(info->imageData != NULL) { +void GuiIconGrid::OnGameTitleAdded(gameInfo *info) { + DEBUG_FUNCTION_LINE("Adding %016llX", info->titleId); + GuiImageData *imageData = &noIcon; + if (info->imageData != nullptr) { imageData = info->imageData; } - GameIcon * image = new GameIcon(imageData); + GameIcon *image = new GameIcon(imageData); image->setRenderReflection(false); image->setStrokeRender(false); image->setSelected(info->titleId == selectedGame); image->setRenderIconLast(true); - GuiButton * button = new GuiButton(noIcon.getWidth(), noIcon.getHeight()); + GuiButton *button = new GuiButton(noIcon.getWidth(), noIcon.getHeight()); button->setImage(image); button->setPosition(0, 0); button->setEffectGrow(); @@ -469,7 +456,7 @@ void GuiIconGrid::OnGameTitleAdded(gameInfo * info) { button->pointedOff.connect(this, &GuiIconGrid::OnGameButtonPointedOff); //button->dragged.connect(this, &GuiIconGrid::OnGameButtonDragged); - GameInfoContainer * container = new GameInfoContainer(button, image, info); + GameInfoContainer *container = new GameInfoContainer(button, image, info); containerMutex.lock(); gameInfoContainers[info->titleId] = container; containerMutex.unlock(); @@ -477,33 +464,34 @@ void GuiIconGrid::OnGameTitleAdded(gameInfo * info) { positionMutex.lock(); bool foundFreePlace = false; - for(uint32_t i = 0; i < position.size(); i++) { - if(position[i] == 0) { + for (uint32_t i = 0; i < position.size(); i++) { + if (position[i] == 0) { position[i] = info->titleId; foundFreePlace = true; break; } } - if(!foundFreePlace) { + if (!foundFreePlace) { position.push_back(info->titleId); } positionMutex.unlock(); bUpdatePositions = true; } -void GuiIconGrid::OnGameTitleUpdated(gameInfo * info) { - DEBUG_FUNCTION_LINE("Updating infos of %016llX\n", info->titleId); - GameInfoContainer * container = NULL; + +void GuiIconGrid::OnGameTitleUpdated(gameInfo *info) { + DEBUG_FUNCTION_LINE("Updating infos of %016llX", info->titleId); + GameInfoContainer *container = nullptr; containerMutex.lock(); - for (auto const& x : gameInfoContainers) { - if(info->titleId == x.first) { + for (auto const &x: gameInfoContainers) { + if (info->titleId == x.first) { container = x.second; break; } } // keep the lock to delay the draw() until the image data is ready. - if(container != NULL) { + if (container != nullptr) { container->updateImageData(); } @@ -513,30 +501,30 @@ void GuiIconGrid::OnGameTitleUpdated(gameInfo * info) { } void GuiIconGrid::process() { - if(currentlyHeld != NULL) { - if(!currentlyHeld->isStateSet(GuiElement::STATE_HELD)) { - DEBUG_FUNCTION_LINE("Not held anymore\n"); + if (currentlyHeld != nullptr) { + if (!currentlyHeld->isStateSet(GuiElement::STATE_HELD)) { + DEBUG_FUNCTION_LINE("Not held anymore"); positionMutex.lock(); - if(dragTarget) { - DEBUG_FUNCTION_LINE("Let's swap\n"); + if (dragTarget) { + DEBUG_FUNCTION_LINE("Let's swap"); - std::vector> vec; + std::vector> vec; containerMutex.lock(); // copy key-value pairs from the map to the vector - std::copy(gameInfoContainers.begin(), gameInfoContainers.end(), std::back_inserter>>(vec)); + std::copy(gameInfoContainers.begin(), gameInfoContainers.end(), std::back_inserter>>(vec)); containerMutex.unlock(); uint64_t targetTitleId = 0; - for (auto const& x : vec) { - if(x.second->button == dragTarget) { + for (auto const &x: vec) { + if (x.second->button == dragTarget) { targetTitleId = x.first; break; } } - for(uint32_t i = 0; i< positionButtons.size(); i++) { - if(positionButtons[i] == dragTarget) { - if(i < position.size() && i != currentlyHeldPosition) { + for (uint32_t i = 0; i < positionButtons.size(); i++) { + if (positionButtons[i] == dragTarget) { + if (i < position.size() && (int32_t) i != currentlyHeldPosition) { position[i] = currentlyHeldTitleId; - DEBUG_FUNCTION_LINE("Set position to title id to %d\n", i, currentlyHeldPosition); + DEBUG_FUNCTION_LINE("Set position to title id to %d", i, currentlyHeldPosition); } else { targetTitleId = currentlyHeldTitleId; } @@ -544,45 +532,45 @@ void GuiIconGrid::process() { break; } } - if(currentlyHeldPosition >= 0 && currentlyHeldPosition <= (int32_t) position.size()) { + if (currentlyHeldPosition >= 0 && currentlyHeldPosition <= (int32_t) position.size()) { position[currentlyHeldPosition] = targetTitleId; } - dragTarget = NULL; + dragTarget = nullptr; } else { - if(currentlyHeldPosition >= 0 && currentlyHeldPosition <= (int32_t) position.size()) { + if (currentlyHeldPosition >= 0 && currentlyHeldPosition <= (int32_t) position.size()) { position[currentlyHeldPosition] = currentlyHeldTitleId; } } positionMutex.unlock(); - currentlyHeld = NULL; + currentlyHeld = nullptr; currentlyHeldTitleId = 0; currentlyHeldPosition = -1; bUpdatePositions = true; } else { - //DEBUG_FUNCTION_LINE("Holding it\n"); + //DEBUG_FUNCTION_LINE("Holding it"); bUpdatePositions = true; } } - if(currentLeftPosition < targetLeftPosition) { + if (currentLeftPosition < targetLeftPosition) { currentLeftPosition += 35; - if(currentLeftPosition > targetLeftPosition) + if (currentLeftPosition > targetLeftPosition) currentLeftPosition = targetLeftPosition; bUpdatePositions = true; - } else if(currentLeftPosition > targetLeftPosition) { + } else if (currentLeftPosition > targetLeftPosition) { currentLeftPosition -= 35; - if(currentLeftPosition < targetLeftPosition) + if (currentLeftPosition < targetLeftPosition) currentLeftPosition = targetLeftPosition; bUpdatePositions = true; } - if(bUpdatePositions) { + if (bUpdatePositions) { bUpdatePositions = false; updateButtonPositions(); } @@ -591,7 +579,7 @@ void GuiIconGrid::process() { GuiFrame::process(); } -void GuiIconGrid::update(GuiController * c) { +void GuiIconGrid::update(GuiController *c) { GuiFrame::update(c); } @@ -605,69 +593,69 @@ void GuiIconGrid::updateButtonPositions() { int32_t col = 0, row = 0, listOff = 0; // create an empty vector of pairs - std::vector> vec; + std::vector> vec; containerMutex.lock(); // copy key-value pairs from the map to the vector - std::copy(gameInfoContainers.begin(), gameInfoContainers.end(), std::back_inserter>>(vec)); + std::copy(gameInfoContainers.begin(), gameInfoContainers.end(), std::back_inserter>>(vec)); containerMutex.unlock(); - for (auto const& x : vec) { - if(x.second->button == currentlyHeld) { + for (auto const &x: vec) { + if (x.second->button == currentlyHeld) { currentlyHeldTitleId = x.first; } remove(x.second->button); } - for (auto const& x : emptyButtons) { + for (auto const &x: emptyButtons) { remove(x); } - if(sortByName) { + if (sortByName) { std::sort(vec.begin(), vec.end(), - [](const std::pair& l, const std::pair& r) { - if (l.second != r.second) - return l.second->info->name.compare(r.second->info->name) <0; + [](const std::pair &l, const std::pair &r) { + if (l.second != r.second) + return l.second->info->name.compare(r.second->info->name) < 0; - return l.first < r.first; - }); + return l.first < r.first; + }); } // TODO somehow be able to adjust the positions. //position.clear(); - for(uint32_t i = 0; i pages) { + if ((uint32_t) curPage > pages) { curPage = 0; } targetLeftPosition = -curPage * getWidth(); - if((uint32_t) curPage < (pages - 1)) { + if ((uint32_t) curPage < (pages - 1)) { arrowRightButton.clearState(GuiElement::STATE_DISABLED); arrowRightButton.setVisible(true); bringToFront(&arrowRightButton); } - if(curPage > 0) { + if (curPage > 0) { arrowLeftButton.clearState(GuiElement::STATE_DISABLED); arrowLeftButton.setVisible(true); bringToFront(&arrowLeftButton); @@ -676,49 +664,49 @@ void GuiIconGrid::updateButtonPositions() { uint32_t startPage = -(currentLeftPosition / getWidth()); uint32_t endPage = startPage; - if(targetLeftPosition != currentLeftPosition) { - for (auto const& x : vec) { + if (targetLeftPosition != currentLeftPosition) { + for (auto const &x: vec) { x.second->button->setHoldable(false); } endPage++; - if(endPage > pages) { + if (endPage > pages) { endPage = pages; } } else { - for (auto const& x : vec) { + for (auto const &x: vec) { x.second->button->setHoldable(true); } } uint32_t startValue = startPage * (MAX_COLS * MAX_ROWS); positionButtons.clear(); - for(uint32_t i = 0; i 0) { - GameInfoContainer * container = NULL; + if (titleID > 0) { + GameInfoContainer *container = nullptr; containerMutex.lock(); - if(gameInfoContainers.find(titleID) != gameInfoContainers.end()) { + if (gameInfoContainers.find(titleID) != gameInfoContainers.end()) { container = gameInfoContainers[titleID]; } containerMutex.unlock(); - if(container != NULL) { + if (container != nullptr) { element = container->button; } } } - if(element == NULL) { - if(emptyButtons.size() <= emptyIconUse) { + if (element == nullptr) { + if (emptyButtons.size() <= emptyIconUse) { break; } element = emptyButtons.at(emptyIconUse); @@ -729,19 +717,19 @@ void GuiIconGrid::updateButtonPositions() { append(element); col++; - if(col >= MAX_COLS) { + if (col >= MAX_COLS) { col = 0; row++; } - if(row >= MAX_ROWS) { + if (row >= MAX_ROWS) { row = 0; } } - if(currentlyHeld != NULL) { + if (currentlyHeld != nullptr) { append(currentlyHeld); } - if(positionButtons.size() > position.size() && targetLeftPosition == currentLeftPosition) { - for(uint32_t i = 0; i < positionButtons.size() - position.size(); i++) { + if (positionButtons.size() > position.size() && targetLeftPosition == currentLeftPosition) { + for (uint32_t i = 0; i < positionButtons.size() - position.size(); i++) { position.push_back(0); } } diff --git a/src/gui/GuiIconGrid.h b/src/gui/GuiIconGrid.h index 08addf7..dacb807 100644 --- a/src/gui/GuiIconGrid.h +++ b/src/gui/GuiIconGrid.h @@ -27,19 +27,27 @@ class GuiIconGrid : public GuiTitleBrowser, public sigslot::has_slots<> { public: GuiIconGrid(int32_t w, int32_t h, uint64_t selectedTitleId, bool sortByName); + virtual ~GuiIconGrid(); void setSelectedGame(uint64_t idx); + uint64_t getSelectedGame(void); - void update(GuiController * t); + void update(GuiController *t); + void draw(CVideo *pVideo); + void process(); - void OnGameTitleListUpdated(GameList * list); - void OnAddGameTitle(gameInfo * info); - void OnGameTitleUpdated(gameInfo * info); - void OnGameTitleAdded(gameInfo * info); + void OnGameTitleListUpdated(GameList *list); + + void OnAddGameTitle(gameInfo *info); + + void OnGameTitleUpdated(gameInfo *info); + + void OnGameTitleAdded(gameInfo *info); + private: static const int32_t MAX_ROWS = 3; static const int32_t MAX_COLS = 5; @@ -66,8 +74,8 @@ private: GuiButton upButton; GuiButton launchButton; - GuiImageData* arrowRightImageData; - GuiImageData* arrowLeftImageData; + GuiImageData *arrowRightImageData; + GuiImageData *arrowLeftImageData; GuiImage arrowRightImage; GuiImage arrowLeftImage; GuiButton arrowRightButton; @@ -79,23 +87,35 @@ private: GuiDragListener dragListener; void OnLeftArrowClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnRightArrowClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); void OnLeftClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnRightClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnDownClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnUpClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); void OnLaunchClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnGameButtonClick(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnGameButtonHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnGameButtonPointedOn(GuiButton *button, const GuiController *controller); + void OnGameButtonPointedOff(GuiButton *button, const GuiController *controller); + void OnDrag(GuiDragListener *button, const GuiController *controller, GuiTrigger *trigger, int32_t dx, int32_t dy); void OnLeftArrowHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnRightArrowHeld(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnLeftArrowReleased(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); + void OnRightArrowReleased(GuiButton *button, const GuiController *controller, GuiTrigger *trigger); void updateButtonPositions(); @@ -112,44 +132,44 @@ private: int32_t targetLeftPosition; uint32_t gameLaunchTimer; bool bUpdatePositions = false; - GuiButton * currentlyHeld = NULL; + GuiButton *currentlyHeld = nullptr; uint64_t currentlyHeldTitleId = 0; int32_t currentlyHeldPosition = -1; - GuiButton * dragTarget = NULL; + GuiButton *dragTarget = nullptr; class GameInfoContainer { public: - GameInfoContainer(GuiButton* button, GameIcon * image, gameInfo * info) { + GameInfoContainer(GuiButton *button, GameIcon *image, gameInfo *info) { this->image = image; this->info = info; this->button = button; } ~GameInfoContainer() { - if(button != NULL) { + if (button != nullptr) { AsyncExecutor::pushForDelete(button); } - if(image != NULL) { + if (image != nullptr) { AsyncExecutor::pushForDelete(image); } } void updateImageData() { - if(image != NULL && info != NULL && info->imageData != NULL) { + if (image != nullptr && info != nullptr && info->imageData != nullptr) { image->setImageData(info->imageData); } } - GameIcon * image; - gameInfo * info; - GuiButton * button; + GameIcon *image; + gameInfo *info; + GuiButton *button; }; std::recursive_mutex positionMutex; std::recursive_mutex containerMutex; std::map gameInfoContainers; std::vector position; - std::vector positionButtons; + std::vector positionButtons; std::vector emptyIcons; std::vector emptyButtons; diff --git a/src/gui/GuiTitleBrowser.h b/src/gui/GuiTitleBrowser.h index cc72240..d7f5dd7 100644 --- a/src/gui/GuiTitleBrowser.h +++ b/src/gui/GuiTitleBrowser.h @@ -7,14 +7,18 @@ class GuiTitleBrowser : public GuiFrame { public: GuiTitleBrowser(int32_t w, int32_t h, uint64_t GameIndex) : GuiFrame(w, h) {} + virtual ~GuiTitleBrowser() {} virtual void setSelectedGame(uint64_t idx) = 0; + virtual uint64_t getSelectedGame(void) = 0; - virtual void OnGameTitleListUpdated(GameList * list) = 0; - virtual void OnGameTitleUpdated(gameInfo * info) = 0; - virtual void OnGameTitleAdded(gameInfo * info) = 0; + virtual void OnGameTitleListUpdated(GameList *list) = 0; + + virtual void OnGameTitleUpdated(gameInfo *info) = 0; + + virtual void OnGameTitleAdded(gameInfo *info) = 0; sigslot::signal2 gameLaunchClicked; sigslot::signal2 gameSelectionChanged; diff --git a/src/menu/GameSplashScreen.cpp b/src/menu/GameSplashScreen.cpp index a0eaceb..94d1a8f 100644 --- a/src/menu/GameSplashScreen.cpp +++ b/src/menu/GameSplashScreen.cpp @@ -4,36 +4,36 @@ #include "fs/FSUtils.h" #include "utils/AsyncExecutor.h" -GameSplashScreen::GameSplashScreen(int32_t w, int32_t h, gameInfo * info, bool onTV) : GuiFrame(w, h), - bgImageColor(w, h, (GX2Color) { - 0, 0, 0, 0 -}) { +GameSplashScreen::GameSplashScreen(int32_t w, int32_t h, gameInfo *info, bool onTV) : GuiFrame(w, h), + bgImageColor(w, h, (GX2Color) { + 0, 0, 0, 0 + }) { bgImageColor.setImageColor((GX2Color) { - 79, 153, 239, 255 + 79, 153, 239, 255 }, 0); bgImageColor.setImageColor((GX2Color) { - 79, 153, 239, 255 + 79, 153, 239, 255 }, 1); bgImageColor.setImageColor((GX2Color) { - 59, 159, 223, 255 + 59, 159, 223, 255 }, 2); bgImageColor.setImageColor((GX2Color) { - 59, 159, 223, 255 + 59, 159, 223, 255 }, 3); append(&bgImageColor); this->onTV = onTV; this->info = info; std::string filepath = "fs:" + info->gamePath + META_PATH + "/bootDRCTex.tga"; - if(onTV) { + if (onTV) { filepath = "fs:" + info->gamePath + META_PATH + "/bootTVTex.tga"; } - uint8_t *buffer = NULL; + uint8_t *buffer = nullptr; uint32_t bufferSize = 0; int iResult = FSUtils::LoadFileToMem(filepath.c_str(), &buffer, &bufferSize); - if(iResult > 0) { + if (iResult > 0) { splashScreenData = new GuiImageData(buffer, bufferSize, GX2_TEX_CLAMP_MODE_MIRROR); - if(splashScreenData) { + if (splashScreenData) { bgImageColor.setImageData(splashScreenData); bgImageColor.setScale(((float) h) / splashScreenData->getHeight()); } @@ -50,9 +50,9 @@ void GameSplashScreen::OnSplashScreenFadeInDone(GuiElement *element) { } -void GameSplashScreen::draw(CVideo * v) { +void GameSplashScreen::draw(CVideo *v) { GuiFrame::draw(v); - if(launchGame && frameCounter++ > 1) { + if (launchGame && frameCounter++ > 1) { DEBUG_FUNCTION_LINE("Launch game %d\n", onTV); gameGameSplashScreenFinished(this, info, onTV); } @@ -60,7 +60,7 @@ void GameSplashScreen::draw(CVideo * v) { GameSplashScreen::~GameSplashScreen() { DEBUG_FUNCTION_LINE("Destroy me\n"); - if(splashScreenData) { + if (splashScreenData) { AsyncExecutor::pushForDelete(splashScreenData); } } diff --git a/src/menu/GameSplashScreen.h b/src/menu/GameSplashScreen.h index a9540fb..9d002a9 100644 --- a/src/menu/GameSplashScreen.h +++ b/src/menu/GameSplashScreen.h @@ -1,18 +1,24 @@ #pragma once + #include "game/GameList.h" #include #include + class GameSplashScreen : public GuiFrame, public sigslot::has_slots<> { public: - GameSplashScreen(int32_t w, int32_t h, gameInfo * info, bool onTV); + GameSplashScreen(int32_t w, int32_t h, gameInfo *info, bool onTV); + virtual ~GameSplashScreen(); - void OnSplashScreenFadeInDone(GuiElement * element); - virtual void draw(CVideo * v); + + void OnSplashScreenFadeInDone(GuiElement *element); + + virtual void draw(CVideo *v); + sigslot::signal3 gameGameSplashScreenFinished; private: GuiImage bgImageColor; - GuiImageData* splashScreenData = NULL; - gameInfo * info = NULL; + GuiImageData *splashScreenData = nullptr; + gameInfo *info = nullptr; bool launchGame = false; uint32_t frameCounter = 0; bool onTV = false; diff --git a/src/menu/KeyboardHelper.cpp b/src/menu/KeyboardHelper.cpp index 59416cc..8874f9e 100644 --- a/src/menu/KeyboardHelper.cpp +++ b/src/menu/KeyboardHelper.cpp @@ -4,20 +4,20 @@ #include KeyboardHelper::KeyboardHelper() { - FSClient *fsClient = (FSClient *)MEMAllocFromDefaultHeap(sizeof(FSClient)); - FSAddClient(fsClient, 0); + auto *_fsClient = (FSClient *) MEMAllocFromDefaultHeap(sizeof(FSClient)); + FSAddClient(_fsClient, FS_ERROR_FLAG_ALL); // Create swkbd nn::swkbd::CreateArg createArg; createArg.regionType = nn::swkbd::RegionType::Europe; createArg.workMemory = MEMAllocFromDefaultHeap(nn::swkbd::GetWorkMemorySize(0)); - memset(createArg.workMemory,0, sizeof(nn::swkbd::GetWorkMemorySize(0))); + memset(createArg.workMemory, 0, sizeof(nn::swkbd::GetWorkMemorySize(0))); this->workMemory = createArg.workMemory; - createArg.fsClient = fsClient; + createArg.fsClient = _fsClient; this->fsClient = createArg.fsClient; - DEBUG_FUNCTION_LINE("Calling create\n"); + DEBUG_FUNCTION_LINE("Calling create"); if (!nn::swkbd::Create(createArg)) { - DEBUG_FUNCTION_LINE("Failed to create keyboard\n"); + DEBUG_FUNCTION_LINE("Failed to create keyboard"); return; } @@ -25,24 +25,24 @@ KeyboardHelper::KeyboardHelper() { } KeyboardHelper::~KeyboardHelper() { - if(keyboardCreated) { + if (keyboardCreated) { nn::swkbd::Destroy(); MEMFreeToDefaultHeap(this->workMemory); - this->workMemory = NULL; + this->workMemory = nullptr; - FSDelClient(fsClient, 0); + FSDelClient(fsClient, FS_ERROR_FLAG_ALL); MEMFreeToDefaultHeap(this->fsClient); keyboardCreated = false; } } bool KeyboardHelper::openKeyboard() { - if(keyboardCreated) { + if (keyboardCreated) { // Show the keyboard nn::swkbd::AppearArg appearArg; appearArg.keyboardArg.configArg.languageType = nn::swkbd::LanguageType::English; if (!nn::swkbd::AppearInputForm(appearArg)) { - DEBUG_FUNCTION_LINE("nn::swkbd::AppearInputForm failed\n"); + DEBUG_FUNCTION_LINE("nn::swkbd::AppearInputForm failed"); return false; } keyboardOpen = true; @@ -56,9 +56,9 @@ std::string KeyboardHelper::getResult() { } bool KeyboardHelper::checkResult() { - if(keyboardCreated) { + if (keyboardCreated) { VPADStatus vpadStatus; - if(keyboardOpen) { + if (keyboardOpen) { VPADRead(VPAD_CHAN_0, &vpadStatus, 1, nullptr); VPADGetTPCalibratedPoint(VPAD_CHAN_0, &vpadStatus.tpNormal, &vpadStatus.tpNormal); } diff --git a/src/menu/KeyboardHelper.h b/src/menu/KeyboardHelper.h index c1daa02..8777015 100644 --- a/src/menu/KeyboardHelper.h +++ b/src/menu/KeyboardHelper.h @@ -1,4 +1,5 @@ #pragma once + #include #include @@ -10,13 +11,13 @@ public: bool checkResult(); - void drawTV(); + static void drawTV(); - void drawDRC(); + static void drawDRC(); bool openKeyboard(); - bool isReady(){ + bool isReady() { return keyboardCreated; } @@ -24,8 +25,8 @@ public: private: - void * workMemory = NULL; - FSClient * fsClient = NULL; + void *workMemory = nullptr; + FSClient *fsClient = nullptr; bool keyboardOpen = false; bool keyboardCreated = false; std::string resultStr = ""; diff --git a/src/menu/MainDrcButtonsFrame.h b/src/menu/MainDrcButtonsFrame.h index 0a1bc52..a47c0f4 100644 --- a/src/menu/MainDrcButtonsFrame.h +++ b/src/menu/MainDrcButtonsFrame.h @@ -20,26 +20,16 @@ #include "gui/Gui.h" #include "resources/Resources.h" -class MainDrcButtonsFrame : public GuiFrame, public sigslot::has_slots<> -{ +class MainDrcButtonsFrame : public GuiFrame, public sigslot::has_slots<> { public: MainDrcButtonsFrame(int32_t w, int32_t h) - : GuiFrame(w, h) - , buttonClickSound(Resources::GetSound("settings_click_2.mp3")) - , screenSwitchSound(Resources::GetSound("screenSwitchSound.mp3")) - , switchIconData(Resources::GetImageData("layoutSwitchButton.png")) - , settingsIconData(Resources::GetImageData("settingsButton.png")) - , switchIcon(switchIconData) - , settingsIcon(settingsIconData) - , switchLayoutButton(switchIcon.getWidth(), switchIcon.getHeight()) - , settingsButton(settingsIcon.getWidth(), settingsIcon.getHeight()) - , gameListFilterButton(w, h) - , touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH) - , wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A) - , settingsTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_ZL, true) - , switchLayoutTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_ZR, true) - , plusTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_PLUS, true) - { + : GuiFrame(w, h), buttonClickSound(Resources::GetSound("settings_click_2.mp3")), screenSwitchSound(Resources::GetSound("screenSwitchSound.mp3")), + switchIconData(Resources::GetImageData("layoutSwitchButton.png")), settingsIconData(Resources::GetImageData("settingsButton.png")), switchIcon(switchIconData), + settingsIcon(settingsIconData), switchLayoutButton(switchIcon.getWidth(), switchIcon.getHeight()), settingsButton(settingsIcon.getWidth(), settingsIcon.getHeight()), + gameListFilterButton(w, h), touchTrigger(GuiTrigger::CHANNEL_1, GuiTrigger::VPAD_TOUCH), + wpadTouchTrigger(GuiTrigger::CHANNEL_2 | GuiTrigger::CHANNEL_3 | GuiTrigger::CHANNEL_4 | GuiTrigger::CHANNEL_5, GuiTrigger::BUTTON_A), + settingsTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_ZL, true), switchLayoutTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_ZR, true), + plusTrigger(GuiTrigger::CHANNEL_ALL, GuiTrigger::BUTTON_PLUS, true) { settingsButton.setClickable(true); settingsButton.setImage(&settingsIcon); settingsButton.setTrigger(&touchTrigger); @@ -68,8 +58,8 @@ public: gameListFilterButton.clicked.connect(this, &MainDrcButtonsFrame::OnGameListFilterButtonClicked); append(&gameListFilterButton); } - virtual ~MainDrcButtonsFrame() - { + + virtual ~MainDrcButtonsFrame() { Resources::RemoveImageData(switchIconData); Resources::RemoveImageData(settingsIconData); Resources::RemoveSound(buttonClickSound); @@ -83,9 +73,11 @@ private: void OnSettingsButtonClick(GuiButton *button, const GuiController *controller, GuiTrigger *) { settingsButtonClicked(this); } + void OnLayoutSwithClick(GuiButton *button, const GuiController *controller, GuiTrigger *) { layoutSwitchClicked(this); } + void OnGameListFilterButtonClicked(GuiButton *button, const GuiController *controller, GuiTrigger *) { gameListFilterClicked(this); } diff --git a/src/menu/MainWindow.cpp b/src/menu/MainWindow.cpp index b07e227..557e327 100644 --- a/src/menu/MainWindow.cpp +++ b/src/menu/MainWindow.cpp @@ -29,14 +29,9 @@ #include "GameSplashScreen.h" MainWindow::MainWindow(int32_t w, int32_t h) - : width(w) - , height(h) - , gameClickSound(Resources::GetSound("game_click.mp3")) - , mainSwitchButtonFrame(NULL) - , currentTvFrame(NULL) - , currentDrcFrame(NULL) { - for(int32_t i = 0; i < 4; i++) { - std::string filename = StringTools::strfmt("player%i_point.png", i+1); + : width(w), height(h), gameClickSound(Resources::GetSound("game_click.mp3")), mainSwitchButtonFrame(nullptr), currentTvFrame(nullptr), currentDrcFrame(nullptr) { + for (int32_t i = 0; i < 4; i++) { + std::string filename = StringTools::strfmt("player%i_point.png", i + 1); pointerImgData[i] = Resources::GetImageData(filename.c_str()); pointerImg[i] = new GuiImage(pointerImgData[i]); pointerImg[i]->setScale(1.5f); @@ -46,7 +41,7 @@ MainWindow::MainWindow(int32_t w, int32_t h) gameList.titleListChanged.connect(this, &MainWindow::OnGameTitleListChanged); gameList.titleUpdated.connect(this, &MainWindow::OnGameTitleUpdated); gameList.titleAdded.connect(this, &MainWindow::OnGameTitleAdded); - AsyncExecutor::execute([&] {gameList.load();}); + AsyncExecutor::execute([&] { gameList.load(); }); } @@ -54,15 +49,15 @@ MainWindow::~MainWindow() { gameList.titleListChanged.disconnect(this); gameList.titleUpdated.disconnect(this); gameList.titleAdded.disconnect(this); - while(!tvElements.empty()) { + while (!tvElements.empty()) { delete tvElements[0]; remove(tvElements[0]); } - while(!drcElements.empty()) { + while (!drcElements.empty()) { delete drcElements[0]; remove(drcElements[0]); } - for(int32_t i = 0; i < 4; i++) { + for (int32_t i = 0; i < 4; i++) { delete pointerImg[i]; Resources::RemoveImageData(pointerImgData[i]); } @@ -75,18 +70,18 @@ void MainWindow::updateEffects() { uint32_t tvSize = tvElements.size(); uint32_t drcSize = drcElements.size(); - for(uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { + for (uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { drcElements[i]->updateEffects(); } //! only update TV elements that are not updated yet because they are on DRC - for(uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { + for (uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { uint32_t n; - for(n = 0; (n < drcSize) && (n < drcElements.size()); n++) { - if(tvElements[i] == drcElements[n]) + for (n = 0; (n < drcSize) && (n < drcElements.size()); n++) { + if (tvElements[i] == drcElements[n]) break; } - if(n == drcElements.size()) { + if (n == drcElements.size()) { tvElements[i]->updateEffects(); } } @@ -97,24 +92,24 @@ void MainWindow::process() { uint32_t tvSize = tvElements.size(); uint32_t drcSize = drcElements.size(); - for(uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { + for (uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { drcElements[i]->process(); } //! only update TV elements that are not updated yet because they are on DRC - for(uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { + for (uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { uint32_t n; - for(n = 0; (n < drcSize) && (n < drcElements.size()); n++) { - if(tvElements[i] == drcElements[n]) + for (n = 0; (n < drcSize) && (n < drcElements.size()); n++) { + if (tvElements[i] == drcElements[n]) break; } - if(n == drcElements.size()) { + if (n == drcElements.size()) { tvElements[i]->process(); } } - if(keyboardInstance != NULL) { - if(keyboardInstance->checkResult()) { + if (keyboardInstance != nullptr) { + if (keyboardInstance->checkResult()) { std::string result = keyboardInstance->getResult(); currentTvFrame->clearState(GuiElement::STATE_DISABLED); @@ -125,23 +120,23 @@ void MainWindow::process() { } } -void MainWindow::OnGameTitleListChanged(GameList * list) { +void MainWindow::OnGameTitleListChanged(GameList *list) { currentTvFrame->OnGameTitleListUpdated(list); - if(currentTvFrame != currentDrcFrame) { + if (currentTvFrame != currentDrcFrame) { currentDrcFrame->OnGameTitleListUpdated(list); } } -void MainWindow::OnGameTitleUpdated(gameInfo * info) { +void MainWindow::OnGameTitleUpdated(gameInfo *info) { currentTvFrame->OnGameTitleUpdated(info); - if(currentTvFrame != currentDrcFrame) { + if (currentTvFrame != currentDrcFrame) { currentDrcFrame->OnGameTitleUpdated(info); } } -void MainWindow::OnGameTitleAdded(gameInfo * info) { +void MainWindow::OnGameTitleAdded(gameInfo *info) { currentTvFrame->OnGameTitleAdded(info); - if(currentTvFrame != currentDrcFrame) { + if (currentTvFrame != currentDrcFrame) { currentDrcFrame->OnGameTitleAdded(info); } } @@ -150,16 +145,16 @@ void MainWindow::update(GuiController *controller) { //! dont read behind the initial elements in case one was added //uint32_t tvSize = tvElements.size(); - if(controller->chan & GuiTrigger::CHANNEL_1) { + if (controller->chan & GuiTrigger::CHANNEL_1) { uint32_t drcSize = drcElements.size(); - for(uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { + for (uint32_t i = 0; (i < drcSize) && (i < drcElements.size()); ++i) { drcElements[i]->update(controller); } } else { uint32_t tvSize = tvElements.size(); - for(uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { + for (uint32_t i = 0; (i < tvSize) && (i < tvElements.size()); ++i) { tvElements[i]->update(controller); } } @@ -179,7 +174,7 @@ void MainWindow::update(GuiController *controller) { // } // } - if(controller->chanIdx >= 1 && controller->chanIdx <= 4 && controller->data.validPointer) { + if (controller->chanIdx >= 1 && controller->chanIdx <= 4 && controller->data.validPointer) { int32_t wpadIdx = controller->chanIdx - 1; float posX = controller->data.x; float posY = controller->data.y; @@ -190,41 +185,41 @@ void MainWindow::update(GuiController *controller) { } void MainWindow::drawDrc(CVideo *video) { - for(uint32_t i = 0; i < drcElements.size(); ++i) { + for (uint32_t i = 0; i < drcElements.size(); ++i) { drcElements[i]->draw(video); } - for(int32_t i = 0; i < 4; i++) { - if(pointerValid[i]) { + for (int32_t i = 0; i < 4; i++) { + if (pointerValid[i]) { pointerImg[i]->setAlpha(0.5f); pointerImg[i]->draw(video); pointerImg[i]->setAlpha(1.0f); } } - if(keyboardInstance != NULL) { + if (keyboardInstance != nullptr) { keyboardInstance->drawDRC(); } } void MainWindow::drawTv(CVideo *video) { - for(uint32_t i = 0; i < tvElements.size(); ++i) { + for (uint32_t i = 0; i < tvElements.size(); ++i) { tvElements[i]->draw(video); } - for(int32_t i = 0; i < 4; i++) { - if(pointerValid[i]) { + for (int32_t i = 0; i < 4; i++) { + if (pointerValid[i]) { pointerImg[i]->draw(video); pointerValid[i] = false; } } - if(keyboardInstance != NULL) { + if (keyboardInstance != nullptr) { keyboardInstance->drawTV(); } } void MainWindow::SetupMainView() { - currentTvFrame = new GuiIconGrid(width, height,0, true); + currentTvFrame = new GuiIconGrid(width, height, 0, true); currentTvFrame->setEffect(EFFECT_FADE, 10, 255); currentTvFrame->setState(GuiElement::STATE_DISABLED); @@ -232,12 +227,12 @@ void MainWindow::SetupMainView() { appendTv(currentTvFrame); - currentDrcFrame = new GuiIconGrid(width, height,0, false); + currentDrcFrame = new GuiIconGrid(width, height, 0, false); currentDrcFrame->setEffect(EFFECT_FADE, 10, 255); currentDrcFrame->setState(GuiElement::STATE_DISABLED); currentDrcFrame->effectFinished.connect(this, &MainWindow::OnOpenEffectFinish); - if(currentTvFrame != currentDrcFrame) { + if (currentTvFrame != currentDrcFrame) { currentDrcFrame->setEffect(EFFECT_FADE, 10, 255); currentDrcFrame->setState(GuiElement::STATE_DISABLED); currentDrcFrame->effectFinished.connect(this, &MainWindow::OnOpenEffectFinish); @@ -250,7 +245,7 @@ void MainWindow::SetupMainView() { currentDrcFrame->gameLaunchClicked.disconnect(this); - if(currentTvFrame != currentDrcFrame) { + if (currentTvFrame != currentDrcFrame) { currentTvFrame->gameSelectionChanged.connect(this, &MainWindow::OnGameSelectionChange); currentTvFrame->gameLaunchClicked.connect(this, &MainWindow::OnGameLaunchSplashScreen); } @@ -272,11 +267,11 @@ void MainWindow::SetupMainView() { } void MainWindow::OnLayoutSwitchClicked(GuiElement *element) { - if(!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) { + if (!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) { return; } - if(currentTvFrame == currentDrcFrame) { + if (currentTvFrame == currentDrcFrame) { return; } @@ -291,15 +286,15 @@ void MainWindow::OnLayoutSwitchClicked(GuiElement *element) { } void MainWindow::OnGameListFilterButtonClicked(GuiElement *element) { - if(!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) { + if (!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) { return; } - if(keyboardInstance == NULL) { + if (keyboardInstance == nullptr) { keyboardInstance = new KeyboardHelper(); } - if(keyboardInstance->isReady()) { - if(keyboardInstance->openKeyboard()) { + if (keyboardInstance->isReady()) { + if (keyboardInstance->openKeyboard()) { currentTvFrame->setState(GuiElement::STATE_DISABLED); currentDrcFrame->setState(GuiElement::STATE_DISABLED); mainSwitchButtonFrame->setState(GuiElement::STATE_DISABLED); @@ -308,7 +303,7 @@ void MainWindow::OnGameListFilterButtonClicked(GuiElement *element) { } void MainWindow::OnLayoutSwitchEffectFinish(GuiElement *element) { - if(!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) + if (!currentTvFrame || !currentDrcFrame || !mainSwitchButtonFrame) return; element->effectFinished.disconnect(this); @@ -361,12 +356,12 @@ void MainWindow::OnSettingsButtonClicked(GuiElement *element) { } void MainWindow::OnGameSelectionChange(GuiTitleBrowser *element, uint64_t selectedIdx) { - if(!currentDrcFrame || !currentTvFrame) + if (!currentDrcFrame || !currentTvFrame) return; - if(element == currentDrcFrame && currentDrcFrame != currentTvFrame) { + if (element == currentDrcFrame && currentDrcFrame != currentTvFrame) { currentTvFrame->setSelectedGame(selectedIdx); - } else if(element == currentTvFrame && currentDrcFrame != currentTvFrame) { + } else if (element == currentTvFrame && currentDrcFrame != currentTvFrame) { currentDrcFrame->setSelectedGame(selectedIdx); } } @@ -376,26 +371,26 @@ void MainWindow::OnGameSelectionChange(GuiTitleBrowser *element, uint64_t select #define MII_MAKER_USA_TITLE_ID (0x000500101004A100) #define MII_MAKER_EUR_TITLE_ID (0x000500101004A200) -extern "C" void _SYSLaunchTitleByPathFromLauncher(const char * path, int len, int); +extern "C" void _SYSLaunchTitleByPathFromLauncher(const char *path, int len, int); -void MainWindow::OnGameLaunchSplashScreen(GuiTitleBrowser * element, uint64_t titleID) { - gameInfo * info = gameList.getGameInfo(titleID); - if(info != NULL) { +void MainWindow::OnGameLaunchSplashScreen(GuiTitleBrowser *element, uint64_t titleID) { + gameInfo *info = gameList.getGameInfo(titleID); + if (info != nullptr) { uint64_t ownTitleId = OSGetTitleID(); if (ownTitleId == HBL_TITLE_ID || - ownTitleId == MII_MAKER_JPN_TITLE_ID || - ownTitleId == MII_MAKER_USA_TITLE_ID || - ownTitleId == MII_MAKER_EUR_TITLE_ID) { + ownTitleId == MII_MAKER_JPN_TITLE_ID || + ownTitleId == MII_MAKER_USA_TITLE_ID || + ownTitleId == MII_MAKER_EUR_TITLE_ID) { OnGameLaunch(titleID); } else { - GameSplashScreen * gameSettingsDRC = new GameSplashScreen(width,height,info, false); + GameSplashScreen *gameSettingsDRC = new GameSplashScreen(width, height, info, false); gameSettingsDRC->setEffect(EFFECT_FADE, 15, 255); gameSettingsDRC->setState(GuiElement::STATE_DISABLED); gameSettingsDRC->effectFinished.connect(this, &MainWindow::OnOpenEffectFinish); gameSettingsDRC->gameGameSplashScreenFinished.connect(this, &MainWindow::OnGameLaunchSplashScreenFinished); appendDrc(gameSettingsDRC); - GameSplashScreen * gameSettingsTV = new GameSplashScreen(width,height,info, true); + GameSplashScreen *gameSettingsTV = new GameSplashScreen(width, height, info, true); gameSettingsTV->setEffect(EFFECT_FADE, 15, 255); gameSettingsTV->setState(GuiElement::STATE_DISABLED); gameSettingsTV->effectFinished.connect(this, &MainWindow::OnOpenEffectFinish); @@ -407,31 +402,32 @@ void MainWindow::OnGameLaunchSplashScreen(GuiTitleBrowser * element, uint64_t ti } } -void MainWindow::OnGameLaunchSplashScreenFinished(GuiElement * element, gameInfo * info, bool launchGame) { - if(info == NULL) { +void MainWindow::OnGameLaunchSplashScreenFinished(GuiElement *element, gameInfo *info, bool launchGame) { + if (info == nullptr) { return; } - if(launchGame) { + if (launchGame) { OnGameLaunch(info->titleId); } - if(element) { + if (element) { element->setState(GuiElement::STATE_DISABLED); element->setEffect(EFFECT_FADE, 15, 255); element->effectFinished.connect(this, &MainWindow::OnCloseEffectFinish); } } + void MainWindow::OnGameLaunch(uint64_t titleID) { - gameInfo * info = gameList.getGameInfo(titleID); - if(info != NULL) { + gameInfo *info = gameList.getGameInfo(titleID); + if (info != nullptr) { uint64_t titleID = OSGetTitleID(); if (titleID == HBL_TITLE_ID || - titleID == MII_MAKER_JPN_TITLE_ID || - titleID == MII_MAKER_USA_TITLE_ID || - titleID == MII_MAKER_EUR_TITLE_ID) { + titleID == MII_MAKER_JPN_TITLE_ID || + titleID == MII_MAKER_USA_TITLE_ID || + titleID == MII_MAKER_EUR_TITLE_ID) { SYSLaunchTitle(info->titleId); } else { - const char* path = info->gamePath.c_str(); - _SYSLaunchTitleByPathFromLauncher(path, strlen(path),0); + const char *path = info->gamePath.c_str(); + _SYSLaunchTitleByPathFromLauncher(path, strlen(path), 0); } } else { DEBUG_FUNCTION_LINE("Failed to find gameInfo for titleId %016llX\n", titleID); diff --git a/src/menu/MainWindow.h b/src/menu/MainWindow.h index a89a3f9..ebbe3d8 100644 --- a/src/menu/MainWindow.h +++ b/src/menu/MainWindow.h @@ -30,17 +30,19 @@ class CVideo; class MainWindow : public sigslot::has_slots<> { public: MainWindow(int32_t w, int32_t h); + virtual ~MainWindow(); void appendTv(GuiElement *e) { - if(!e) + if (!e) return; removeTv(e); tvElements.push_back(e); } + void appendDrc(GuiElement *e) { - if(!e) + if (!e) return; removeDrc(e); @@ -53,14 +55,15 @@ public: } void insertTv(uint32_t pos, GuiElement *e) { - if(!e) + if (!e) return; removeTv(e); tvElements.insert(tvElements.begin() + pos, e); } + void insertDrc(uint32_t pos, GuiElement *e) { - if(!e) + if (!e) return; removeDrc(e); @@ -73,16 +76,17 @@ public: } void removeTv(GuiElement *e) { - for(uint32_t i = 0; i < tvElements.size(); ++i) { - if(e == tvElements[i]) { + for (uint32_t i = 0; i < tvElements.size(); ++i) { + if (e == tvElements[i]) { tvElements.erase(tvElements.begin() + i); break; } } } + void removeDrc(GuiElement *e) { - for(uint32_t i = 0; i < drcElements.size(); ++i) { - if(e == drcElements[i]) { + for (uint32_t i = 0; i < drcElements.size(); ++i) { + if (e == drcElements[i]) { drcElements.erase(drcElements.begin() + i); break; } @@ -93,20 +97,26 @@ public: removeTv(e); removeDrc(e); } + void removeAll() { tvElements.clear(); drcElements.clear(); } void drawDrc(CVideo *video); + void drawTv(CVideo *video); + void update(GuiController *controller); + void updateEffects(); + void process(); void lockGUI() { guiMutex.lock(); } + void unlockGUI() { guiMutex.unlock(); } @@ -115,22 +125,30 @@ private: void SetupMainView(void); void OnOpenEffectFinish(GuiElement *element); + void OnCloseEffectFinish(GuiElement *element); void OnGameLaunch(uint64_t titleId); - void OnGameLaunchSplashScreenFinished(GuiElement * element, gameInfo * info, bool launchGame); + + void OnGameLaunchSplashScreenFinished(GuiElement *element, gameInfo *info, bool launchGame); + void OnGameLaunchSplashScreen(GuiTitleBrowser *element, uint64_t titleId); void OnGameSelectionChange(GuiTitleBrowser *element, uint64_t titleId); void OnSettingsButtonClicked(GuiElement *element); + void OnLayoutSwitchClicked(GuiElement *element); + void OnLayoutSwitchEffectFinish(GuiElement *element); + void OnGameListFilterButtonClicked(GuiElement *element); - void OnGameTitleListChanged(GameList * list); - void OnGameTitleUpdated(gameInfo * info); - void OnGameTitleAdded(gameInfo * info); + void OnGameTitleListChanged(GameList *list); + + void OnGameTitleUpdated(gameInfo *info); + + void OnGameTitleAdded(gameInfo *info); int32_t width, height; std::vector drcElements; @@ -140,8 +158,8 @@ private: MainDrcButtonsFrame *mainSwitchButtonFrame; - GuiTitleBrowser * currentTvFrame; - GuiTitleBrowser * currentDrcFrame; + GuiTitleBrowser *currentTvFrame; + GuiTitleBrowser *currentDrcFrame; GuiImageData *pointerImgData[4]; GuiImage *pointerImg[4]; @@ -150,7 +168,7 @@ private: GameList gameList; std::recursive_mutex guiMutex; - KeyboardHelper * keyboardInstance = NULL; + KeyboardHelper *keyboardInstance = nullptr; }; #endif //_MAIN_WINDOW_H_ diff --git a/src/resources/Resources.cpp b/src/resources/Resources.cpp index 45e9bb8..8dcb450 100644 --- a/src/resources/Resources.cpp +++ b/src/resources/Resources.cpp @@ -15,38 +15,38 @@ #include -Resources * Resources::instance = NULL; +Resources *Resources::instance = nullptr; void Resources::Clear() { - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { - if(RecourceList[i].CustomFile) { + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { + if (RecourceList[i].CustomFile) { free(RecourceList[i].CustomFile); - RecourceList[i].CustomFile = NULL; + RecourceList[i].CustomFile = nullptr; } - if(RecourceList[i].CustomFileSize != 0) + if (RecourceList[i].CustomFileSize != 0) RecourceList[i].CustomFileSize = 0; } - if(instance) + if (instance) delete instance; - instance = NULL; + instance = nullptr; } -bool Resources::LoadFiles(const char * path) { - if(!path) +bool Resources::LoadFiles(const char *path) { + if (!path) return false; bool result = false; Clear(); - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { std::string fullpath(path); fullpath += "/"; fullpath += RecourceList[i].filename; - uint8_t * buffer = NULL; + uint8_t *buffer = nullptr; uint32_t filesize = 0; FSUtils::LoadFileToMem(fullpath.c_str(), &buffer, &filesize); @@ -59,44 +59,44 @@ bool Resources::LoadFiles(const char * path) { return result; } -const uint8_t * Resources::GetFile(const char * filename) { - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { - if(strcasecmp(filename, RecourceList[i].filename) == 0) { +const uint8_t *Resources::GetFile(const char *filename) { + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { + if (strcasecmp(filename, RecourceList[i].filename) == 0) { return (RecourceList[i].CustomFile ? RecourceList[i].CustomFile : RecourceList[i].DefaultFile); } } - return NULL; + return nullptr; } -uint32_t Resources::GetFileSize(const char * filename) { - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { - if(strcasecmp(filename, RecourceList[i].filename) == 0) { +uint32_t Resources::GetFileSize(const char *filename) { + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { + if (strcasecmp(filename, RecourceList[i].filename) == 0) { return (RecourceList[i].CustomFile ? RecourceList[i].CustomFileSize : RecourceList[i].DefaultFileSize); } } return 0; } -GuiImageData * Resources::GetImageData(const char * filename) { - if(!instance) +GuiImageData *Resources::GetImageData(const char *filename) { + if (!instance) instance = new Resources; std::map >::iterator itr = instance->imageDataMap.find(std::string(filename)); - if(itr != instance->imageDataMap.end()) { + if (itr != instance->imageDataMap.end()) { itr->second.first++; return itr->second.second; } - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { - if(strcasecmp(filename, RecourceList[i].filename) == 0) { - const uint8_t * buff = RecourceList[i].CustomFile ? RecourceList[i].CustomFile : RecourceList[i].DefaultFile; + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { + if (strcasecmp(filename, RecourceList[i].filename) == 0) { + const uint8_t *buff = RecourceList[i].CustomFile ? RecourceList[i].CustomFile : RecourceList[i].DefaultFile; const uint32_t size = RecourceList[i].CustomFile ? RecourceList[i].CustomFileSize : RecourceList[i].DefaultFileSize; - if(buff == NULL) - return NULL; + if (buff == nullptr) + return nullptr; - GuiImageData * image = new GuiImageData(buff, size); + GuiImageData *image = new GuiImageData(buff, size); instance->imageDataMap[std::string(filename)].first = 1; instance->imageDataMap[std::string(filename)].second = image; @@ -104,17 +104,17 @@ GuiImageData * Resources::GetImageData(const char * filename) { } } - return NULL; + return nullptr; } -void Resources::RemoveImageData(GuiImageData * image) { +void Resources::RemoveImageData(GuiImageData *image) { std::map >::iterator itr; - for(itr = instance->imageDataMap.begin(); itr != instance->imageDataMap.end(); itr++) { - if(itr->second.second == image) { + for (itr = instance->imageDataMap.begin(); itr != instance->imageDataMap.end(); itr++) { + if (itr->second.second == image) { itr->second.first--; - if(itr->second.first == 0) { + if (itr->second.first == 0) { AsyncExecutor::pushForDelete(itr->second.second); instance->imageDataMap.erase(itr); @@ -124,25 +124,25 @@ void Resources::RemoveImageData(GuiImageData * image) { } } -GuiSound * Resources::GetSound(const char * filename) { - if(!instance) +GuiSound *Resources::GetSound(const char *filename) { + if (!instance) instance = new Resources; std::map >::iterator itr = instance->soundDataMap.find(std::string(filename)); - if(itr != instance->soundDataMap.end()) { + if (itr != instance->soundDataMap.end()) { itr->second.first++; return itr->second.second; } - for(int32_t i = 0; RecourceList[i].filename != NULL; ++i) { - if(strcasecmp(filename, RecourceList[i].filename) == 0) { - const uint8_t * buff = RecourceList[i].CustomFile ? RecourceList[i].CustomFile : RecourceList[i].DefaultFile; + for (int32_t i = 0; RecourceList[i].filename != nullptr; ++i) { + if (strcasecmp(filename, RecourceList[i].filename) == 0) { + const uint8_t *buff = RecourceList[i].CustomFile ? RecourceList[i].CustomFile : RecourceList[i].DefaultFile; const uint32_t size = RecourceList[i].CustomFile ? RecourceList[i].CustomFileSize : RecourceList[i].DefaultFileSize; - if(buff == NULL) - return NULL; + if (buff == nullptr) + return nullptr; - GuiSound * sound = new GuiSound(buff, size); + GuiSound *sound = new GuiSound(buff, size); instance->soundDataMap[std::string(filename)].first = 1; instance->soundDataMap[std::string(filename)].second = sound; @@ -150,17 +150,17 @@ GuiSound * Resources::GetSound(const char * filename) { } } - return NULL; + return nullptr; } -void Resources::RemoveSound(GuiSound * sound) { +void Resources::RemoveSound(GuiSound *sound) { std::map >::iterator itr; - for(itr = instance->soundDataMap.begin(); itr != instance->soundDataMap.end(); itr++) { - if(itr->second.second == sound) { + for (itr = instance->soundDataMap.begin(); itr != instance->soundDataMap.end(); itr++) { + if (itr->second.second == sound) { itr->second.first--; - if(itr->second.first == 0) { + if (itr->second.first == 0) { AsyncExecutor::pushForDelete(itr->second.second); instance->soundDataMap.erase(itr); } diff --git a/src/resources/Resources.h b/src/resources/Resources.h index 3fc2f37..35b6c25 100644 --- a/src/resources/Resources.h +++ b/src/resources/Resources.h @@ -5,24 +5,32 @@ //! forward declaration class GuiImageData; + class GuiSound; class Resources { public: static void Clear(); - static bool LoadFiles(const char * path); - static const uint8_t * GetFile(const char * filename); - static uint32_t GetFileSize(const char * filename); - static GuiImageData * GetImageData(const char * filename); - static void RemoveImageData(GuiImageData * image); + static bool LoadFiles(const char *path); + + static const uint8_t *GetFile(const char *filename); + + static uint32_t GetFileSize(const char *filename); + + static GuiImageData *GetImageData(const char *filename); + + static void RemoveImageData(GuiImageData *image); + + static GuiSound *GetSound(const char *filename); + + static void RemoveSound(GuiSound *sound); - static GuiSound * GetSound(const char * filename); - static void RemoveSound(GuiSound * sound); private: static Resources *instance; Resources() {} + ~Resources() {} std::map > imageDataMap; diff --git a/src/system/CThread.h b/src/system/CThread.h index 4d5acc1..d81f739 100644 --- a/src/system/CThread.h +++ b/src/system/CThread.h @@ -26,9 +26,9 @@ public: typedef void (* Callback)(CThread *thread, void *arg); //! constructor - CThread(int32_t iAttr, int32_t iPriority = 16, int32_t iStackSize = 0x8000, CThread::Callback callback = NULL, void *callbackArg = NULL) - : pThread(NULL) - , pThreadStack(NULL) + CThread(int32_t iAttr, int32_t iPriority = 16, int32_t iStackSize = 0x8000, CThread::Callback callback = nullptr, void *callbackArg = nullptr) + : pThread(nullptr) + , pThreadStack(nullptr) , pCallback(callback) , pCallbackArg(callbackArg) { //! save attribute assignment @@ -102,7 +102,7 @@ public: if(isThreadSuspended()) resumeThread(); - OSJoinThread(pThread, NULL); + OSJoinThread(pThread, nullptr); } //! free the thread stack buffer if(pThreadStack) @@ -110,8 +110,8 @@ public: if(pThread) free(pThread); - pThread = NULL; - pThreadStack = NULL; + pThread = nullptr; + pThreadStack = nullptr; } //! Thread attributes enum eCThreadAttributes { diff --git a/src/utils/AsyncExecutor.cpp b/src/utils/AsyncExecutor.cpp index a27f673..6a6e6fc 100644 --- a/src/utils/AsyncExecutor.cpp +++ b/src/utils/AsyncExecutor.cpp @@ -1,16 +1,17 @@ #include "AsyncExecutor.h" #include "utils/logger.h" -AsyncExecutor * AsyncExecutor::instance = NULL; +AsyncExecutor *AsyncExecutor::instance = nullptr; -void AsyncExecutor::pushForDeleteInternal(GuiElement * ptr) { +void AsyncExecutor::pushForDeleteInternal(GuiElement *ptr) { deleteListMutex.lock(); deleteList.push(ptr); deleteListMutex.unlock(); } + AsyncExecutor::AsyncExecutor() { thread = new std::thread([&]() { - while(!exitThread) { + while (!exitThread) { mutex.lock(); bool emptyList = elements.empty(); auto it = elements.begin(); @@ -23,37 +24,37 @@ AsyncExecutor::AsyncExecutor() { ++it; } } - if(!emptyList && elements.empty()){ - DEBUG_FUNCTION_LINE("All tasks are done\n"); + if (!emptyList && elements.empty()) { + DEBUG_FUNCTION_LINE("All tasks are done"); } mutex.unlock(); deleteListMutex.lock(); - while(!deleteList.empty()) { - GuiElement * ptr = deleteList.front(); + while (!deleteList.empty()) { + GuiElement *ptr = deleteList.front(); deleteList.pop(); delete ptr; } deleteListMutex.unlock(); std::this_thread::sleep_for(std::chrono::milliseconds(16)); - DCFlushRange((void*)&exitThread, sizeof(exitThread)); + DCFlushRange((void *) &exitThread, sizeof(exitThread)); } }); } AsyncExecutor::~AsyncExecutor() { exitThread = true; - DCFlushRange((void*)&exitThread, sizeof(exitThread)); + DCFlushRange((void *) &exitThread, sizeof(exitThread)); thread->join(); } void AsyncExecutor::executeInternal(std::function func) { - if(elements.size() > 10) { - DEBUG_FUNCTION_LINE("Warning, many tasks running currently\n"); + if (elements.size() > 10) { + DEBUG_FUNCTION_LINE("Warning, many tasks running currently"); //std::this_thread::sleep_for(std::chrono::milliseconds(16)); } - DEBUG_FUNCTION_LINE("Add new task\n"); + DEBUG_FUNCTION_LINE("Add new task"); mutex.lock(); - elements.push_back(std::async(std::launch::async,func)); + elements.push_back(std::async(std::launch::async, func)); mutex.unlock(); } diff --git a/src/utils/AsyncExecutor.h b/src/utils/AsyncExecutor.h index 8994c97..108d204 100644 --- a/src/utils/AsyncExecutor.h +++ b/src/utils/AsyncExecutor.h @@ -10,23 +10,24 @@ class AsyncExecutor { public: - static void pushForDelete(GuiElement * element) { - if(!instance) { + static void pushForDelete(GuiElement *element) { + if (!instance) { instance = new AsyncExecutor(); } instance->pushForDeleteInternal(element); } + static void execute(std::function func) { - if(!instance) { + if (!instance) { instance = new AsyncExecutor(); } instance->executeInternal(func); } static void destroyInstance() { - if(instance) { + if (instance) { delete instance; - instance = NULL; + instance = nullptr; } } @@ -34,17 +35,19 @@ private: static AsyncExecutor *instance; AsyncExecutor(); + ~AsyncExecutor(); - void pushForDeleteInternal(GuiElement * element); + void pushForDeleteInternal(GuiElement *element); + void executeInternal(std::function func); std::recursive_mutex mutex; - std::thread * thread; + std::thread *thread; volatile bool exitThread = false; std::vector> elements; std::recursive_mutex deleteListMutex; - std::queue deleteList; + std::queue deleteList; }; diff --git a/src/utils/StringTools.cpp b/src/utils/StringTools.cpp index 9dd6599..d9baf72 100644 --- a/src/utils/StringTools.cpp +++ b/src/utils/StringTools.cpp @@ -36,13 +36,13 @@ #include -BOOL StringTools::EndsWith(const std::string& a, const std::string& b) { +BOOL StringTools::EndsWith(const std::string &a, const std::string &b) { if (b.size() > a.size()) return false; return std::equal(a.begin() + a.size() - b.size(), a.end(), b.begin()); } -const char * StringTools::byte_to_binary(int32_t x) { +const char *StringTools::byte_to_binary(int32_t x) { static char b[9]; b[0] = '\0'; @@ -54,70 +54,70 @@ const char * StringTools::byte_to_binary(int32_t x) { return b; } -std::string StringTools::removeCharFromString(std::string& input,char toBeRemoved) { +std::string StringTools::removeCharFromString(std::string &input, char toBeRemoved) { std::string output = input; size_t position; - while(1) { + while (1) { position = output.find(toBeRemoved); - if(position == std::string::npos) + if (position == std::string::npos) break; output.erase(position, 1); } return output; } -const char * StringTools::fmt(const char * format, ...) { +const char *StringTools::fmt(const char *format, ...) { static char strChar[512]; strChar[0] = 0; va_list va; va_start(va, format); - if((vsprintf(strChar, format, va) >= 0)) { + if ((vsprintf(strChar, format, va) >= 0)) { va_end(va); return (const char *) strChar; } va_end(va); - return NULL; + return nullptr; } -const wchar_t * StringTools::wfmt(const char * format, ...) { +const wchar_t *StringTools::wfmt(const char *format, ...) { static char tmp[512]; static wchar_t strWChar[512]; strWChar[0] = 0; tmp[0] = 0; - if(!format) + if (!format) return (const wchar_t *) strWChar; - if(strcmp(format, "") == 0) + if (strcmp(format, "") == 0) return (const wchar_t *) strWChar; va_list va; va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { - int32_t bt; + if ((vsprintf(tmp, format, va) >= 0)) { + int32_t bt; int32_t strlength = strlen(tmp); - bt = mbstowcs(strWChar, tmp, (strlength < 512) ? strlength : 512 ); + bt = mbstowcs(strWChar, tmp, (strlength < 512) ? strlength : 512); - if(bt > 0) { + if (bt > 0) { strWChar[bt] = 0; return (const wchar_t *) strWChar; } } va_end(va); - return NULL; + return nullptr; } -int32_t StringTools::strprintf(std::string &str, const char * format, ...) { +int32_t StringTools::strprintf(std::string &str, const char *format, ...) { static char tmp[512]; tmp[0] = 0; int32_t result = 0; va_list va; va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { + if ((vsprintf(tmp, format, va) >= 0)) { str = tmp; result = str.size(); } @@ -126,14 +126,14 @@ int32_t StringTools::strprintf(std::string &str, const char * format, ...) { return result; } -std::string StringTools::strfmt(const char * format, ...) { +std::string StringTools::strfmt(const char *format, ...) { std::string str; static char tmp[512]; tmp[0] = 0; va_list va; va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { + if ((vsprintf(tmp, format, va) >= 0)) { str = tmp; } va_end(va); @@ -141,11 +141,11 @@ std::string StringTools::strfmt(const char * format, ...) { return str; } -BOOL StringTools::char2wchar_t(const char * strChar, wchar_t * dest) { - if(!strChar || !dest) +BOOL StringTools::char2wchar_t(const char *strChar, wchar_t *dest) { + if (!strChar || !dest) return false; - int32_t bt; + int32_t bt; bt = mbstowcs(dest, strChar, strlen(strChar)); if (bt > 0) { dest[bt] = 0; @@ -155,39 +155,39 @@ BOOL StringTools::char2wchar_t(const char * strChar, wchar_t * dest) { return false; } -int32_t StringTools::strtokcmp(const char * string, const char * compare, const char * separator) { - if(!string || !compare) +int32_t StringTools::strtokcmp(const char *string, const char *compare, const char *separator) { + if (!string || !compare) return -1; char TokCopy[512]; strncpy(TokCopy, compare, sizeof(TokCopy)); TokCopy[511] = '\0'; - char * strTok = strtok(TokCopy, separator); + char *strTok = strtok(TokCopy, separator); - while (strTok != NULL) { + while (strTok != nullptr) { if (strcasecmp(string, strTok) == 0) { return 0; } - strTok = strtok(NULL,separator); + strTok = strtok(nullptr, separator); } return -1; } -int32_t StringTools::strextcmp(const char * string, const char * extension, char seperator) { - if(!string || !extension) +int32_t StringTools::strextcmp(const char *string, const char *extension, char seperator) { + if (!string || !extension) return -1; char *ptr = strrchr(string, seperator); - if(!ptr) + if (!ptr) return -1; return strcasecmp(ptr + 1, extension); } -std::vector StringTools::stringSplit(const std::string & inValue, const std::string & splitter) { +std::vector StringTools::stringSplit(const std::string &inValue, const std::string &splitter) { std::string value = inValue; std::vector result; while (true) { @@ -202,7 +202,7 @@ std::vector StringTools::stringSplit(const std::string & inValue, c result.push_back(""); break; } - if(index + splitter.size() > value.length()) { + if (index + splitter.size() > value.length()) { break; } value = value.substr(index + splitter.size(), value.length()); @@ -210,12 +210,11 @@ std::vector StringTools::stringSplit(const std::string & inValue, c return result; } -bool StringTools::findStringIC(const std::string & strHaystack, const std::string & strNeedle) -{ - auto it = std::search( - strHaystack.begin(), strHaystack.end(), - strNeedle.begin(), strNeedle.end(), - [](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); } - ); - return (it != strHaystack.end() ); +bool StringTools::findStringIC(const std::string &strHaystack, const std::string &strNeedle) { + auto it = std::search( + strHaystack.begin(), strHaystack.end(), + strNeedle.begin(), strNeedle.end(), + [](char ch1, char ch2) { return std::toupper(ch1) == std::toupper(ch2); } + ); + return (it != strHaystack.end()); } diff --git a/src/utils/StringTools.h b/src/utils/StringTools.h index 4d5ac33..0d28fa4 100644 --- a/src/utils/StringTools.h +++ b/src/utils/StringTools.h @@ -34,27 +34,36 @@ class StringTools { public: - static BOOL EndsWith(const std::string& a, const std::string& b); - static const char * byte_to_binary(int32_t x); - static std::string removeCharFromString(std::string& input,char toBeRemoved); - static const char * fmt(const char * format, ...); - static const wchar_t * wfmt(const char * format, ...); - static int32_t strprintf(std::string &str, const char * format, ...); - static std::string strfmt(const char * format, ...); - static BOOL char2wchar_t(const char * src, wchar_t * dest); - static int32_t strtokcmp(const char * string, const char * compare, const char * separator); - static int32_t strextcmp(const char * string, const char * extension, char seperator); + static BOOL EndsWith(const std::string &a, const std::string &b); - static const char * FullpathToFilename(const char *path) { - if(!path) + static const char *byte_to_binary(int32_t x); + + static std::string removeCharFromString(std::string &input, char toBeRemoved); + + static const char *fmt(const char *format, ...); + + static const wchar_t *wfmt(const char *format, ...); + + static int32_t strprintf(std::string &str, const char *format, ...); + + static std::string strfmt(const char *format, ...); + + static BOOL char2wchar_t(const char *src, wchar_t *dest); + + static int32_t strtokcmp(const char *string, const char *compare, const char *separator); + + static int32_t strextcmp(const char *string, const char *extension, char seperator); + + static const char *FullpathToFilename(const char *path) { + if (!path) return path; - const char * ptr = path; - const char * Filename = ptr; + const char *ptr = path; + const char *Filename = ptr; - while(*ptr != '\0') { - if(ptr[0] == '/' && ptr[1] != '\0') - Filename = ptr+1; + while (*ptr != '\0') { + if (ptr[0] == '/' && ptr[1] != '\0') + Filename = ptr + 1; ++ptr; } @@ -66,8 +75,8 @@ public: uint32_t length = str.size(); //! clear path of double slashes - for(uint32_t i = 1; i < length; ++i) { - if(str[i-1] == '/' && str[i] == '/') { + for (uint32_t i = 1; i < length; ++i) { + if (str[i - 1] == '/' && str[i] == '/') { str.erase(i, 1); i--; length--; @@ -75,10 +84,10 @@ public: } } - static std::vector stringSplit(const std::string & value, const std::string & splitter); + static std::vector stringSplit(const std::string &value, const std::string &splitter); // https://stackoverflow.com/a/19839371 - static bool findStringIC(const std::string & strHaystack, const std::string & strNeedle); + static bool findStringIC(const std::string &strHaystack, const std::string &strNeedle); }; #endif /* __STRING_TOOLS_H */ diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp deleted file mode 100644 index 7d27ef9..0000000 --- a/src/utils/logger.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -static int32_t log_socket __attribute__((section(".data")))= -1; -static struct sockaddr_in connect_addr __attribute__((section(".data"))); -static volatile int32_t log_lock __attribute__((section(".data"))) = 0; -static std::recursive_mutex _lock; - -void log_init_() { - int32_t broadcastEnable = 1; - log_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); - if (log_socket < 0) - return; - - setsockopt(log_socket, SOL_SOCKET, SO_BROADCAST, &broadcastEnable, sizeof(broadcastEnable)); - - memset(&connect_addr, 0, sizeof(struct sockaddr_in)); - connect_addr.sin_family = AF_INET; - connect_addr.sin_port = 4405; - connect_addr.sin_addr.s_addr = htonl(INADDR_BROADCAST); -} - -void log_print_(const char *str) { - // socket is always 0 initially as it is in the BSS - if(log_socket < 0) { - return; - } - - _lock.lock(); - - int32_t len = strlen(str); - int32_t ret; - while (len > 0) { - int32_t block = len < 1400 ? len : 1400; // take max 1400 bytes per UDP packet - ret = sendto(log_socket, str, block, 0, (struct sockaddr *)&connect_addr, sizeof(struct sockaddr_in)); - if(ret < 0) - break; - - len -= ret; - str += ret; - } - - _lock.unlock(); -} - -void OSFatal_printf(const char *format, ...) { - char tmp[512]; - tmp[0] = 0; - va_list va; - va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { - OSFatal(tmp); - } - va_end(va); -} - -void log_printf_(const char *format, ...) { - if(log_socket < 0) { - return; - } - - char tmp[512]; - tmp[0] = 0; - - va_list va; - va_start(va, format); - if((vsprintf(tmp, format, va) >= 0)) { - log_print_(tmp); - } - va_end(va); -} - diff --git a/src/utils/logger.h b/src/utils/logger.h index d026b05..efeda1b 100644 --- a/src/utils/logger.h +++ b/src/utils/logger.h @@ -1,38 +1,24 @@ -#ifndef __LOGGER_H_ -#define __LOGGER_H_ +#pragma once + +#include +#include #ifdef __cplusplus extern "C" { #endif -#include - -void log_init_(); -//void log_deinit_(void); -void log_print_(const char *str); -void log_printf_(const char *format, ...); -void OSFatal_printf(const char *format, ...); - #define __FILENAME_X__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILENAME_X__) -#define OSFATAL_FUNCTION_LINE(FMT, ARGS...)do { \ - OSFatal_printf("[%s]%s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \ +#define DEBUG_FUNCTION_LINE(FMT, ARGS...)do { \ + WHBLogPrintf("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \ } while (0) - - -#define log_init() log_init_() -//#define log_deinit() log_deinit_() -#define log_print(str) log_print_(str) -#define log_printf(FMT, ARGS...) log_printf_(FMT, ## ARGS); - -#define DEBUG_FUNCTION_LINE(FMT, ARGS...)do { \ - log_printf("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \ +#define DEBUG_FUNCTION_LINE_WRITE(FMT, ARGS...)do { \ + WHBLogWritef("[%23s]%30s@L%04d: " FMT "",__FILENAME__,__FUNCTION__, __LINE__, ## ARGS); \ } while (0) #ifdef __cplusplus } #endif -#endif diff --git a/src/utils/utils.c b/src/utils/utils.c index 0042415..01641b1 100644 --- a/src/utils/utils.c +++ b/src/utils/utils.c @@ -7,34 +7,34 @@ #include // https://gist.github.com/ccbrown/9722406 -void dumpHex(const void* data, size_t size) { +void dumpHex(const void *data, size_t size) { char ascii[17]; size_t i, j; ascii[16] = '\0'; - DEBUG_FUNCTION_LINE("0x%08X (0x0000): ", data); + DEBUG_FUNCTION_LINE_WRITE("0x%08X (0x0000): ", data); for (i = 0; i < size; ++i) { - log_printf("%02X ", ((unsigned char*)data)[i]); - if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { - ascii[i % 16] = ((unsigned char*)data)[i]; + WHBLogWritef("%02X ", ((unsigned char *) data)[i]); + if (((unsigned char *) data)[i] >= ' ' && ((unsigned char *) data)[i] <= '~') { + ascii[i % 16] = ((unsigned char *) data)[i]; } else { ascii[i % 16] = '.'; } - if ((i+1) % 8 == 0 || i+1 == size) { - log_printf(" "); - if ((i+1) % 16 == 0) { - log_printf("| %s \n", ascii); - if(i + 1 < size) { - DEBUG_FUNCTION_LINE("0x%08X (0x%04X); ", data + i + 1,i+1); + if ((i + 1) % 8 == 0 || i + 1 == size) { + WHBLogWritef(" "); + if ((i + 1) % 16 == 0) { + WHBLogWritef("| %s \n", ascii); + if (i + 1 < size) { + WHBLogWritef("0x%08X (0x%04X); ", data + i + 1, i + 1); } - } else if (i+1 == size) { - ascii[(i+1) % 16] = '\0'; - if ((i+1) % 16 <= 8) { - log_printf(" "); + } else if (i + 1 == size) { + ascii[(i + 1) % 16] = '\0'; + if ((i + 1) % 16 <= 8) { + WHBLogWritef(" "); } - for (j = (i+1) % 16; j < 16; ++j) { - log_printf(" "); + for (j = (i + 1) % 16; j < 16; ++j) { + WHBLogWritef(" "); } - log_printf("| %s \n", ascii); + WHBLogWritef("| %s \n", ascii); } } } diff --git a/src/utils/utils.h b/src/utils/utils.h index 26caaaf..1d00f98 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -7,12 +7,12 @@ extern "C" { #endif -#define LIMIT(x, min, max) \ - ({ \ - typeof( x ) _x = x; \ - typeof( min ) _min = min; \ - typeof( max ) _max = max; \ - ( ( ( _x ) < ( _min ) ) ? ( _min ) : ( ( _x ) > ( _max ) ) ? ( _max) : ( _x ) ); \ +#define LIMIT(x, min, max) \ + ({ \ + typeof( x ) _x = x; \ + typeof( min ) _min = min; \ + typeof( max ) _max = max; \ + ( ( ( _x ) < ( _min ) ) ? ( _min ) : ( ( _x ) > ( _max ) ) ? ( _max) : ( _x ) ); \ }) #define DegToRad(a) ( (a) * 0.01745329252f ) @@ -26,7 +26,7 @@ extern "C" { #define le64(i) ((((uint64_t)le32((i) & 0xFFFFFFFFLL)) << 32) | ((uint64_t)le32(((i) & 0xFFFFFFFF00000000LL) >> 32))) //Needs to have log_init() called beforehand. -void dumpHex(const void* data, size_t size); +void dumpHex(const void *data, size_t size); #ifdef __cplusplus }