Get rid of Loki

This commit is contained in:
Vladislav Khorev 2018-09-23 10:57:34 +05:00
parent 15a2cbe410
commit ef0392fb63
27 changed files with 92 additions and 52 deletions

View File

@ -92,15 +92,15 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_CONSOLE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<AdditionalLibraryDirectories>../../tes-engine/windows/Engine/x64/Debug;../../boost_1_67_0/stage/lib;..\..\SDL2-2.0.8\lib\x64;..\..\loki-0.1.7\lib;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>../../tes-engine/windows/Engine/x64/Debug;../../boost_1_67_0/stage/lib;..\..\SDL2-2.0.8\lib\x64;..\..\physfs-3.0.1\build\install\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>libjpeg.lib;libpng.lib;Engine.lib;physfs.lib;loki_D.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libjpeg.lib;libpng.lib;Engine.lib;physfs.lib;SDL2.lib;SDL2main.lib;opengl32.lib;glu32.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol> <EntryPointSymbol>
</EntryPointSymbol> </EntryPointSymbol>
</Link> </Link>
@ -128,7 +128,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\..\loki-0.1.7\include\loki;..\opensteer\include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>../../libs/boost-gil-extension;../../tes-engine;../../eigen;../../boost_1_67_0/;../../libs/jpeg-9;../../libs/jpeg-9/vc10;../../libs/lpng1510;..\;..\math;..\coldet\;..\util;..\..\SDL2-2.0.8\include;..\..\physfs-3.0.1\build\install\include;..\opensteer\include;..\replaceLoki</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;TARGET_WIN32;_WIN32_WINNT=0x0501;WIN32_LEAN_AND_MEAN;EIGEN_DONT_ALIGN_STATICALLY;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CompileAsWinRT>false</CompileAsWinRT> <CompileAsWinRT>false</CompileAsWinRT>
</ClCompile> </ClCompile>
@ -241,6 +241,7 @@
<ClInclude Include="..\navdata.h" /> <ClInclude Include="..\navdata.h" />
<ClInclude Include="..\opengta.h" /> <ClInclude Include="..\opengta.h" />
<ClInclude Include="..\read_ini.h" /> <ClInclude Include="..\read_ini.h" />
<ClInclude Include="..\replaceLoki\Singleton.h" />
<ClInclude Include="..\slope1_data.h" /> <ClInclude Include="..\slope1_data.h" />
<ClInclude Include="..\slope1_tcoords.h" /> <ClInclude Include="..\slope1_tcoords.h" />
<ClInclude Include="..\spritemanager.h" /> <ClInclude Include="..\spritemanager.h" />

View File

@ -404,6 +404,9 @@
<ClInclude Include="frgbridge.h"> <ClInclude Include="frgbridge.h">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\replaceLoki\Singleton.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\Doxyfile"> <None Include="..\Doxyfile">

3
blockdata.h Normal file → Executable file
View File

@ -35,8 +35,7 @@ namespace OpenGTA {
static float lid_normal_data[numBlockTypes][3]; static float lid_normal_data[numBlockTypes][3];
}; };
typedef Loki::SingletonHolder<BlockData, Loki::CreateUsingNew, typedef Loki::SingletonHolder<BlockData> BlockDataHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> BlockDataHolder;
} }
#define SLOPE_RAW_DATA OpenGTA::BlockDataHolder::Instance().slope_raw_data #define SLOPE_RAW_DATA OpenGTA::BlockDataHolder::Instance().slope_raw_data

1
dataholder.cpp Normal file → Executable file
View File

@ -24,6 +24,7 @@
#include "log.h" #include "log.h"
#include "cistring.h" #include "cistring.h"
namespace OpenGTA { namespace OpenGTA {
template<> ActiveStyle::ActiveData() { template<> ActiveStyle::ActiveData() {
m_data = 0; m_data = 0;

9
dataholder.h Normal file → Executable file
View File

@ -57,16 +57,13 @@ namespace OpenGTA {
/** Singleton: Graphics /** Singleton: Graphics
*/ */
typedef Loki::SingletonHolder< ActiveStyle, Loki::CreateUsingNew, Loki::DefaultLifetime, typedef Loki::SingletonHolder< ActiveStyle> StyleHolder;
Loki::SingleThreaded> StyleHolder;
/** Singleton: Map /** Singleton: Map
*/ */
typedef Loki::SingletonHolder< ActiveMap, Loki::CreateUsingNew, Loki::DefaultLifetime, typedef Loki::SingletonHolder< ActiveMap> MapHolder;
Loki::SingleThreaded> MapHolder;
/** Singleton: Message strings /** Singleton: Message strings
*/ */
typedef Loki::SingletonHolder< MainMsgLookup, Loki::CreateUsingNew, Loki::DefaultLifetime, typedef Loki::SingletonHolder< MainMsgLookup> MainMsgHolder;
Loki::SingleThreaded> MainMsgHolder;
} }

3
font_cache.h Normal file → Executable file
View File

@ -59,8 +59,7 @@ namespace OpenGTA {
OpenGL::DrawableFont* createFont(const std::string & file, const uint32_t & scale); OpenGL::DrawableFont* createFont(const std::string & file, const uint32_t & scale);
}; };
typedef Loki::SingletonHolder<FontCache, Loki::CreateUsingNew, typedef Loki::SingletonHolder<FontCache> FontCacheHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> FontCacheHolder;
} }
#endif #endif

View File

@ -25,11 +25,10 @@
#include "dataholder.h" #include "dataholder.h"
#include "cell_iterator.h" #include "cell_iterator.h"
#include "timer.h" #include "timer.h"
#include "Functor.h"
#include "plane.h" #include "plane.h"
#include "ai.h" #include "ai.h"
#include "localplayer.h" #include "localplayer.h"
#include <functional>
#include "log.h" #include "log.h"
@ -464,7 +463,9 @@ activeWeapon = chooseWeapon;
return; return;
} }
anim.set(Util::Animation::PLAY_FORWARD, Util::Animation::FCALLBACK); anim.set(Util::Animation::PLAY_FORWARD, Util::Animation::FCALLBACK);
Loki::Functor<void> cmd(this, &Pedestrian::die);
std::function<void()> cmd = std::bind(&Pedestrian::die, this);
anim.setCallback(cmd); anim.setCallback(cmd);
isDead++; isDead++;
} }
@ -473,7 +474,7 @@ activeWeapon = chooseWeapon;
isDead = 1; isDead = 1;
switchToAnim(45); switchToAnim(45);
anim.set(Util::Animation::PLAY_FORWARD, Util::Animation::FCALLBACK); anim.set(Util::Animation::PLAY_FORWARD, Util::Animation::FCALLBACK);
Loki::Functor<void> cmd(this, &Pedestrian::die); std::function<void()> cmd = std::bind(&Pedestrian::die, this);
anim.setCallback(cmd); anim.setCallback(cmd);
} }

1
game_objects.h Normal file → Executable file
View File

@ -31,6 +31,7 @@
#include "entity_controller.h" #include "entity_controller.h"
#include "OpenSteer/Proximity.h" #include "OpenSteer/Proximity.h"
#include "util/set.h" #include "util/set.h"
#include <list>
namespace OpenGTA { namespace OpenGTA {

3
gl_camera.h Normal file → Executable file
View File

@ -45,7 +45,6 @@ namespace OpenGL {
}; };
using namespace Loki; using namespace Loki;
typedef SingletonHolder<Camera, CreateUsingNew, DefaultLifetime, typedef SingletonHolder<Camera> CameraHolder;
SingleThreaded> CameraHolder;
} }
#endif #endif

View File

@ -75,7 +75,7 @@ namespace OpenGL {
}; };
using namespace Loki; using namespace Loki;
typedef SingletonHolder<Screen, CreateUsingNew, DefaultLifetime, SingleThreaded> ScreenHolder; typedef SingletonHolder<Screen> ScreenHolder;
} }
#endif #endif

3
gl_spritecache.h Normal file → Executable file
View File

@ -75,8 +75,7 @@ namespace OpenGL {
bool doScale2x; bool doScale2x;
}; };
typedef Loki::SingletonHolder<SpriteCache, Loki::CreateUsingNew, typedef Loki::SingletonHolder<SpriteCache> SpriteCacheHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> SpriteCacheHolder;
} }
#endif #endif

3
localplayer.h Normal file → Executable file
View File

@ -52,8 +52,7 @@ namespace OpenGTA {
PedController * pc_ptr; PedController * pc_ptr;
}; };
typedef Loki::SingletonHolder<PlayerController, Loki::CreateUsingNew, typedef Loki::SingletonHolder<PlayerController> LocalPlayer;
Loki::DefaultLifetime, Loki::SingleThreaded> LocalPlayer;
} }
#endif #endif

3
read_gry.cpp Normal file → Executable file
View File

@ -11,6 +11,7 @@
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
#include <sstream> #include <sstream>
#include <algorithm>
#include "opengta.h" #include "opengta.h"
#include "buffercache.h" #include "buffercache.h"
#include "log.h" #include "log.h"
@ -292,7 +293,7 @@ namespace OpenGTA {
fd = PHYSFS_openRead(style.c_str()); fd = PHYSFS_openRead(style.c_str());
if (fd == NULL) { if (fd == NULL) {
std::string style2(style); std::string style2(style);
transform(style2.begin(), style2.end(), style2.begin(), tolower); std::transform(style2.begin(), style2.end(), style2.begin(), tolower);
fd = PHYSFS_openRead(style2.c_str()); fd = PHYSFS_openRead(style2.c_str());
} }
if (fd == NULL) { if (fd == NULL) {

32
replaceLoki/Singleton.h Executable file
View File

@ -0,0 +1,32 @@
#ifndef SINGLETON_H_INCLUDED
#define SINGLETON_H_INCLUDED
#include <memory>
#include <cassert>
#include <thread>
#include <mutex>
namespace Loki
{
template <typename T>
struct SingletonHolder
{
static T& Instance()
{
static std::once_flag onceFlag;
static std::unique_ptr<T> singleton;
std::call_once(onceFlag,
[] {
singleton = std::make_unique<T>();
});
return *singleton.get();
}
};
}
#endif

3
spritemanager.h Normal file → Executable file
View File

@ -186,8 +186,7 @@ namespace OpenGTA {
}; };
typedef Loki::SingletonHolder<SpriteManager, Loki::CreateUsingNew, typedef Loki::SingletonHolder<SpriteManager> SpriteManagerHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> SpriteManagerHolder;
} }
#endif #endif

4
util/animation.h Normal file → Executable file
View File

@ -23,7 +23,7 @@
#ifndef UTIL_ANIMATION_H #ifndef UTIL_ANIMATION_H
#define UTIL_ANIMATION_H #define UTIL_ANIMATION_H
#include <vector> #include <vector>
#include "Functor.h" #include <functional>
#include "log.h" #include "log.h"
namespace Util { namespace Util {
@ -56,7 +56,7 @@ namespace Util {
inline const OnDone & getDone() const { return onDone; } inline const OnDone & getDone() const { return onDone; }
void jumpToFrame(const uint16_t num, const Status andDo); void jumpToFrame(const uint16_t num, const Status andDo);
void update(const uint32_t & nowTicks); void update(const uint32_t & nowTicks);
typedef Loki::Functor<void> CallbackType; typedef std::function<void()> CallbackType;
void setCallback(CallbackType & cb) { callback = cb; } void setCallback(CallbackType & cb) { callback = cb; }
uint16_t currentFrame; uint16_t currentFrame;

3
util/buffercache.h Normal file → Executable file
View File

@ -110,7 +110,6 @@ namespace Util {
/** Instance of BufferCache. /** Instance of BufferCache.
*/ */
typedef SingletonHolder<BufferCache, CreateUsingNew, DefaultLifetime, typedef SingletonHolder<BufferCache> BufferCacheHolder;
SingleThreaded> BufferCacheHolder;
} }
#endif #endif

1
util/file_helper.cpp Normal file → Executable file
View File

@ -23,6 +23,7 @@
#include <cstdlib> #include <cstdlib>
#include <physfs.h> #include <physfs.h>
#include <sstream> #include <sstream>
#include <algorithm>
#include "m_exceptions.h" #include "m_exceptions.h"
#include "file_helper.h" #include "file_helper.h"
#include "buffercache.h" #include "buffercache.h"

3
util/file_helper.h Normal file → Executable file
View File

@ -47,8 +47,7 @@ namespace Util {
std::string userHomeDir; std::string userHomeDir;
}; };
typedef Loki::SingletonHolder<FileHelper, Loki::CreateUsingNew, Loki::DefaultLifetime, typedef Loki::SingletonHolder<FileHelper> FileHelperHolder;
Loki::SingleThreaded> FileHelperHolder;
} }
#define GET_FILE_HELPER Util::FileHelperHolder::Instance() #define GET_FILE_HELPER Util::FileHelperHolder::Instance()

6
util/gui.h Normal file → Executable file
View File

@ -85,8 +85,7 @@ namespace GUI {
}; };
typedef Loki::SingletonHolder<Manager, Loki::CreateUsingNew, Loki::DefaultLifetime, typedef Loki::SingletonHolder<Manager> ManagerHolder;
Loki::SingleThreaded> ManagerHolder;
class Animation : public Util::Animation { class Animation : public Util::Animation {
public: public:
@ -196,7 +195,8 @@ namespace GUI {
void receive(SDL_MouseButtonEvent & mb_event); void receive(SDL_MouseButtonEvent & mb_event);
SDL_Color innerColor; SDL_Color innerColor;
float value; float value;
typedef Loki::Functor<void, LOKI_TYPELIST_1(float)> SC_Functor; //typedef Loki::Functor<void, LOKI_TYPELIST_1(float)> SC_Functor;
typedef std::function<void(float)> SC_Functor;
SC_Functor changeCB; SC_Functor changeCB;
}; };

View File

@ -1,7 +1,18 @@
#include "map_helper.h" #include "map_helper.h"
#include "log.h" #include "log.h"
#include <cstdlib>
#include <iostream>
#include <ctime>
namespace Util { namespace Util {
SpriteCreationArea::SpriteCreationArea()
{
std::srand(unsigned(std::time(0)));
}
void SpriteCreationArea::setRects(const SDL_Rect & allowed, const SDL_Rect & denied) { void SpriteCreationArea::setRects(const SDL_Rect & allowed, const SDL_Rect & denied) {
validRects = std::make_pair(allowed, denied); validRects = std::make_pair(allowed, denied);
onScreen = denied; onScreen = denied;
@ -23,8 +34,9 @@ namespace Util {
} }
TupleOfUint8 SpriteCreationArea::getValidCoord() { TupleOfUint8 SpriteCreationArea::getValidCoord() {
uint32_t x = rnd.nextUint(validRects.first.w) + validRects.first.x; uint32_t x = std::rand() % validRects.first.w + validRects.first.x;
uint32_t y = rnd.nextUint(validRects.first.h) + validRects.first.y; uint32_t y = std::rand() % validRects.first.h + validRects.first.y;
return std::make_pair(x, y); return std::make_pair(x, y);
} }

View File

@ -6,7 +6,7 @@
#include <SDL_video.h> #include <SDL_video.h>
#include <cassert> // yasli/random.h needs it #include <cassert> // yasli/random.h needs it
#include "math3d.h" #include "math3d.h"
#include "yasli/random.h" //#include "yasli/random.h"
namespace Util { namespace Util {
typedef std::pair<SDL_Rect, SDL_Rect> TupleOfRects; typedef std::pair<SDL_Rect, SDL_Rect> TupleOfRects;
@ -15,11 +15,11 @@ namespace Util {
class SpriteCreationArea { class SpriteCreationArea {
public: public:
SpriteCreationArea();
//ListOfTupleOfRects validTuple; //ListOfTupleOfRects validTuple;
TupleOfRects validRects; TupleOfRects validRects;
void setRects(const SDL_Rect & allowed, const SDL_Rect & denied); void setRects(const SDL_Rect & allowed, const SDL_Rect & denied);
TupleOfUint8 getValidCoord(); TupleOfUint8 getValidCoord();
Random rnd;
bool isOnScreen(const Vector3D & p); bool isOnScreen(const Vector3D & p);
bool isOffScreen(const Vector3D & p); bool isOffScreen(const Vector3D & p);
private: private:

3
util/sample_cache.h Normal file → Executable file
View File

@ -70,8 +70,7 @@ namespace Audio {
m_map.clear(); m_map.clear();
} }
typedef Loki::SingletonHolder< SampleCache , Loki::CreateUsingNew, typedef Loki::SingletonHolder< SampleCache> SampleCacheHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> SampleCacheHolder;
} }
#endif #endif

3
util/sound_mixer.h Normal file → Executable file
View File

@ -28,8 +28,7 @@ namespace Audio {
Audio::SoundDevice::OPEN); } Audio::SoundDevice::OPEN); }
}; };
typedef Loki::SingletonHolder<Mixer, Loki::CreateUsingNew, typedef Loki::SingletonHolder<Mixer> MixerHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> MixerHolder;
} }
#endif #endif

5
util/sound_music_player.h Normal file → Executable file
View File

@ -25,11 +25,12 @@
#ifdef WITH_SOUND #ifdef WITH_SOUND
#include <SDL_sound.h> #include <SDL_sound.h>
#include "Functor.h" #include <functional>
namespace Audio { namespace Audio {
static int music_volume = 127; static int music_volume = 127;
typedef Loki::Functor<void> MusicFinishedCallbackType; //typedef Loki::Functor<void> MusicFinishedCallbackType;
typedef std::function<void()> MusicFinishedCallbackType;
struct MusicPlayerCtrl { struct MusicPlayerCtrl {
static bool isPlaying; static bool isPlaying;

7
util/timer.h Normal file → Executable file
View File

@ -24,7 +24,7 @@
#define OGTA_TIMER_H #define OGTA_TIMER_H
#include <map> #include <map>
#include "Singleton.h" #include "Singleton.h"
#include "Functor.h" #include <functional>
// instead of SDL_GetTicks() // instead of SDL_GetTicks()
#define TIMER_OPENSTEER_CLOCK #define TIMER_OPENSTEER_CLOCK
@ -35,7 +35,7 @@
class Timer { class Timer {
public: public:
typedef Loki::Functor<void, LOKI_TYPELIST_1(float)> CallbackType; typedef std::function<void(float)> CallbackType;
struct TimeEvent { struct TimeEvent {
TimeEvent(const uint32_t & b, const uint32_t e, CallbackType & c); TimeEvent(const uint32_t & b, const uint32_t e, CallbackType & c);
TimeEvent(const uint32_t & b, CallbackType & c); TimeEvent(const uint32_t & b, CallbackType & c);
@ -73,7 +73,6 @@ class Timer {
SimTimeMap simTimeEvents; SimTimeMap simTimeEvents;
}; };
typedef Loki::SingletonHolder<Timer, Loki::CreateUsingNew, typedef Loki::SingletonHolder<Timer> TimerHolder;
Loki::DefaultLifetime, Loki::SingleThreaded> TimerHolder;
#endif #endif

View File

@ -70,7 +70,7 @@ OpenGTA::CityView *city = NULL;
GUI::Label * fps_label = NULL; GUI::Label * fps_label = NULL;
//Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com //Xperimental -- Vladislav Khorev vladislav.khorev@fishrungames.com
int city_num = 2; int city_num = 0;
const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" }; const char* styles_8[3] = { "STYLE001.GRY", "STYLE002.GRY", "STYLE003.GRY" };
const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" }; const char* styles_24[3] = { "STYLE001.G24", "STYLE002.G24", "STYLE003.G24" };