Hide a couple of internals in an anonymous namespace.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
Andrea Odetti 2020-12-27 20:26:07 +00:00
parent 7d6439fefd
commit 84b6afe758
2 changed files with 27 additions and 22 deletions

View file

@ -71,21 +71,21 @@ namespace
return true;
}
}
struct CBITMAP : public CHANDLE
{
std::vector<char> image;
};
struct CBITMAP : public CHANDLE
{
std::vector<char> image;
};
std::string getFilename(const std::string & resource)
{
if (resource == "CHARSET40") return "CHARSET4.BMP";
if (resource == "CHARSET82") return "CHARSET82.bmp";
if (resource == "CHARSET8M") return "CHARSET8M.bmp";
if (resource == "CHARSET8C") return "CHARSET8C.bmp";
std::string getFilename(const std::string & resource)
{
if (resource == "CHARSET40") return "CHARSET4.BMP";
if (resource == "CHARSET82") return "CHARSET82.bmp";
if (resource == "CHARSET8M") return "CHARSET8M.bmp";
if (resource == "CHARSET8C") return "CHARSET8C.bmp";
return resource;
}
return resource;
}
HBITMAP LoadBitmap(HINSTANCE hInstance, const char * resource)

View file

@ -6,19 +6,24 @@
#include <linux/windows/misc.h>
#include <frontends/common2/resources.h>
struct CBITMAP : public CHANDLE
namespace
{
std::shared_ptr<SDL_Surface> surface;
};
std::string getFilename(const std::string & resource)
{
if (resource == "CHARSET40") return "CHARSET4.BMP";
if (resource == "CHARSET82") return "CHARSET82.bmp";
if (resource == "CHARSET8M") return "CHARSET8M.bmp";
if (resource == "CHARSET8C") return "CHARSET8C.bmp";
struct CBITMAP : public CHANDLE
{
std::shared_ptr<SDL_Surface> surface;
};
std::string getFilename(const std::string & resource)
{
if (resource == "CHARSET40") return "CHARSET4.BMP";
if (resource == "CHARSET82") return "CHARSET82.bmp";
if (resource == "CHARSET8M") return "CHARSET8M.bmp";
if (resource == "CHARSET8C") return "CHARSET8C.bmp";
return resource;
}
return resource;
}
HBITMAP LoadBitmap(HINSTANCE hInstance, const char * resource)