add jes.h, Core, and Runtime

This commit is contained in:
josh committed 2014-06-18 19:53:23 -04:00
1 parent c19ea4e1b0
commit 83553e78f1
7 files changed
+88 -1

No files matched your search

+2
View File
@@ -1,6 +1,8 @@
#include <iostream>
#include "GUI.h"
#include "jes.h"
using namespace std;
int main(int argc, char *argv[])
+15
View File
@@ -0,0 +1,15 @@
#ifndef JES_H
#define JES_H
#include "jes/Core.h"
#include "jes/Ref.h"
namespace jes
{
void JES_Init(const std::string & bin_path)
{
Core::instance.init(bin_path);
}
}
#endif
+23
View File
@@ -0,0 +1,23 @@
#ifndef JES_CORE_H
#define JES_CORE_H
#include "jes/Ref.h"
#include <string>
namespace jes
{
typedef Ref<std::string> StringRef;
class Core
{
public:
static Core instance;
void init(const std::string & bin_path);
protected:
std::string m_bin_path;
};
}
#endif
+21
View File
@@ -0,0 +1,21 @@
#ifndef JES_RUNTIME_H
#define JES_RUNTIME_H
#include "jes/Core.h"
namespace jes
{
class Runtime
{
public:
enum
{
FONT,
SHADER,
COUNT,
};
static StringRef locate(int type, const std::string & name);
};
}
#endif
+11
View File
@@ -0,0 +1,11 @@
#include "jes/Core.h"
namespace jes
{
Core Core::instance;
void Core::init(const std::string & bin_path)
{
m_bin_path = bin_path;
}
}
+14
View File
@@ -0,0 +1,14 @@
#include "jes/Runtime.h"
namespace jes
{
static const char * const runtime_directories[Runtime::COUNT] = {
"fonts",
"shaders",
};
StringRef Runtime::locate(int type, const std::string & name)
{
return NULL;
}
}