remove "namespace jes" wrapper around C++ content
This commit is contained in:
parent
b6c5e9e1d7
commit
c3b4c33304
@ -7,8 +7,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
FileLoader::FileLoader()
|
FileLoader::FileLoader()
|
||||||
{
|
{
|
||||||
m_buf = NULL;
|
m_buf = NULL;
|
||||||
@ -102,4 +100,3 @@ namespace jes
|
|||||||
{
|
{
|
||||||
return new Text((*m_lines)[line_no].first, (*m_lines)[line_no].second);
|
return new Text((*m_lines)[line_no].first, (*m_lines)[line_no].second);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class FileLoader
|
class FileLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -45,6 +43,5 @@ namespace jes
|
|||||||
LineIndexPairVectorRef m_lines;
|
LineIndexPairVectorRef m_lines;
|
||||||
};
|
};
|
||||||
typedef Ref<FileLoader> FileLoaderRef;
|
typedef Ref<FileLoader> FileLoaderRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
#define JES_O_BINARY 0
|
#define JES_O_BINARY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
bool FileReader::load(const char * fname, uint8_t ** buf, size_t * size)
|
bool FileReader::load(const char * fname, uint8_t ** buf, size_t * size)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@ -61,4 +59,3 @@ namespace jes
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -4,13 +4,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class FileReader
|
class FileReader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool load(const char * fname, uint8_t ** buf, size_t * size);
|
static bool load(const char * fname, uint8_t ** buf, size_t * size);
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
#define round_up_26_6(val) (((val) + 63) >> 6u)
|
#define round_up_26_6(val) (((val) + 63) >> 6u)
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
Font::Font()
|
Font::Font()
|
||||||
{
|
{
|
||||||
m_loaded = false;
|
m_loaded = false;
|
||||||
@ -109,4 +107,3 @@ namespace jes
|
|||||||
m_loaded = true;
|
m_loaded = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -8,8 +8,6 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include "GLTexture.h"
|
#include "GLTexture.h"
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class Font
|
class Font
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -62,6 +60,5 @@ namespace jes
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef Ref<Font> FontRef;
|
typedef Ref<Font> FontRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "FontManager.h"
|
#include "FontManager.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
bool FontManager::load()
|
bool FontManager::load()
|
||||||
{
|
{
|
||||||
if (FT_Init_FreeType(&m_ft) != 0)
|
if (FT_Init_FreeType(&m_ft) != 0)
|
||||||
@ -39,4 +37,3 @@ namespace jes
|
|||||||
return font;
|
return font;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <ft2build.h>
|
#include <ft2build.h>
|
||||||
#include FT_FREETYPE_H
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class FontManager
|
class FontManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -20,6 +18,5 @@ namespace jes
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef Ref<FontManager> FontManagerRef;
|
typedef Ref<FontManager> FontManagerRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "GLBuffer.h"
|
#include "GLBuffer.h"
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
GLBuffer::GLBuffer()
|
GLBuffer::GLBuffer()
|
||||||
{
|
{
|
||||||
m_id = 0;
|
m_id = 0;
|
||||||
@ -27,4 +25,3 @@ namespace jes
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#include "Ref.h"
|
#include "Ref.h"
|
||||||
#include "gl3w.h"
|
#include "gl3w.h"
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class GLBuffer
|
class GLBuffer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -19,6 +17,5 @@ namespace jes
|
|||||||
GLenum m_target;
|
GLenum m_target;
|
||||||
};
|
};
|
||||||
typedef Ref<GLBuffer> GLBufferRef;
|
typedef Ref<GLBuffer> GLBufferRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
GLProgram::GLProgram()
|
GLProgram::GLProgram()
|
||||||
{
|
{
|
||||||
m_id = glCreateProgram();
|
m_id = glCreateProgram();
|
||||||
@ -82,4 +80,3 @@ namespace jes
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class GLProgram
|
class GLProgram
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -25,6 +23,5 @@ namespace jes
|
|||||||
std::map<std::string, GLint> m_uniforms;
|
std::map<std::string, GLint> m_uniforms;
|
||||||
};
|
};
|
||||||
typedef Ref<GLProgram> GLProgramRef;
|
typedef Ref<GLProgram> GLProgramRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
GLShader::~GLShader()
|
GLShader::~GLShader()
|
||||||
{
|
{
|
||||||
if (m_id > 0)
|
if (m_id > 0)
|
||||||
@ -69,4 +67,3 @@ namespace jes
|
|||||||
delete[] file;
|
delete[] file;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include "Path.h"
|
#include "Path.h"
|
||||||
#include "gl3w.h"
|
#include "gl3w.h"
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class GLShader
|
class GLShader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -20,6 +18,5 @@ namespace jes
|
|||||||
GLuint m_id;
|
GLuint m_id;
|
||||||
};
|
};
|
||||||
typedef Ref<GLShader> GLShaderRef;
|
typedef Ref<GLShader> GLShaderRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
GLTexture::GLTexture()
|
GLTexture::GLTexture()
|
||||||
{
|
{
|
||||||
glGenTextures(1, &m_id);
|
glGenTextures(1, &m_id);
|
||||||
@ -41,4 +39,3 @@ namespace jes
|
|||||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, d);
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, d);
|
||||||
delete[] d;
|
delete[] d;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include "gl3w.h"
|
#include "gl3w.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class GLTexture
|
class GLTexture
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -24,6 +22,5 @@ namespace jes
|
|||||||
unsigned int m_height;
|
unsigned int m_height;
|
||||||
};
|
};
|
||||||
typedef Ref<GLTexture> GLTextureRef;
|
typedef Ref<GLTexture> GLTextureRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#define WIDTH 500
|
#define WIDTH 500
|
||||||
#define HEIGHT 500
|
#define HEIGHT 500
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
bool GUI::load()
|
bool GUI::load()
|
||||||
{
|
{
|
||||||
glClearColor (0.0, 0.0, 0.0, 0.0);
|
glClearColor (0.0, 0.0, 0.0, 0.0);
|
||||||
@ -148,4 +146,3 @@ namespace jes
|
|||||||
glVertexAttribIPointer(0, 2, GL_INT, 0, 0);
|
glVertexAttribIPointer(0, 2, GL_INT, 0, 0);
|
||||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -7,8 +7,6 @@
|
|||||||
#include "GLProgram.h"
|
#include "GLProgram.h"
|
||||||
#include "GLBuffer.h"
|
#include "GLBuffer.h"
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class GUI
|
class GUI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -35,6 +33,5 @@ namespace jes
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef Ref<GUI> GUIRef;
|
typedef Ref<GUI> GUIRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
Path::Path(const char * path)
|
Path::Path(const char * path)
|
||||||
{
|
{
|
||||||
m_path = path;
|
m_path = path;
|
||||||
@ -118,4 +116,3 @@ namespace jes
|
|||||||
c = '/';
|
c = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class Path;
|
class Path;
|
||||||
typedef Ref<Path> PathRef;
|
typedef Ref<Path> PathRef;
|
||||||
class Path
|
class Path
|
||||||
@ -26,6 +24,5 @@ namespace jes
|
|||||||
void clean();
|
void clean();
|
||||||
std::string m_path;
|
std::string m_path;
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class Ref
|
class Ref
|
||||||
{
|
{
|
||||||
@ -99,6 +97,5 @@ namespace jes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
Text::Text()
|
Text::Text()
|
||||||
{
|
{
|
||||||
m_buffer = NULL;
|
m_buffer = NULL;
|
||||||
@ -38,4 +36,3 @@ namespace jes
|
|||||||
m_gap_index = m_size - m_gap_size;
|
m_gap_index = m_size - m_gap_size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include "Ref.h"
|
#include "Ref.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace jes
|
|
||||||
{
|
|
||||||
class Text
|
class Text
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -31,6 +29,5 @@ namespace jes
|
|||||||
size_t m_gap_size;
|
size_t m_gap_size;
|
||||||
};
|
};
|
||||||
typedef Ref<Text> TextRef;
|
typedef Ref<Text> TextRef;
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user